Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 1.34 KB

README.md

File metadata and controls

30 lines (17 loc) · 1.34 KB

Suppression File ... Ignore Mac Internal Library Leaks -- 42 School Mac

What is Supression File :

A suppression file is a file that tells Valgrind to ignore certain errors or leaks that are not caused by your program but by some external library or system call. This can help you focus on the errors that are relevant to your code and avoid false positives.

Why is it required ?

Valgrind reads the leaks from the readline library itself and finding leaks in your project (Ex: So long, Minishell) difficult. See the first picture which creates huge line of leaks due to macos. At times it wastes time to find the actual one. Then after using the suppression with the command above you will see the output with your actual leaks in your function.

image image

Pasted image 20230517114825.png]]

How to Run ?

  • Clone the repo
  • Copy the ignore_readline.supp file to your Project folder
  • run valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --suppressions=ignore_readline.supp -s ./program_name
  • Check the output

Feedbacks

If you face bugs or want to add something to this let us know :)