How does valgrind work?

Valgrind basically runs your application in a “sandbox.” While running in this sandbox, it is able to insert its own instructions to do advanced debugging and profiling. From the manual: Your program is then run on a synthetic CPU provided by the Valgrind core. As new code is executed for the first time, the core … Read more

Is it possible to make valgrind ignore certain libraries?

Assuming you are running the memcheck tool and you want to ignore Leak errors in libcrypto only, you could put a suppression like: { ignore_libcrypto_conditional_jump_errors Memcheck:Leak … obj:*/libcrypto.so.* } … into a file and pass it to valgrind with –suppressions=*FILENAME*. To ignore Leak errors in all shared libraries under any lib directory (/lib, /lib64, /usr/lib, … Read more