-
Notifications
You must be signed in to change notification settings - Fork 0
How to test Minishell with Valgrind
Michael Leitner edited this page Apr 20, 2023
·
2 revisions
You'll get a lot of error messages because of the readline library which doesn't free the history after exiting. This is no cause for concern because it's not an actual leak, since the history needs to stay available even after exiting the shell.
In order to still debug "actual" memory leaks, you can use valgrind with a ignore file that suppresses error messages caused by the readline library (you'll find this in the main folder of the repository, named vg_ignore). Those are summarized in the "suppressed" stats.
You can use this command to test the program with the ignore file.
valgrind --leak-check=full --show-leak-kinds=all --suppressions=vg_ignore