Skip to content
Discussion options

You must be logged in to vote

I would treat this as “not proven to be a leak” until Valgrind shows definitely lost or indirectly lost with a useful allocation stack.

still reachable means there is still a live root to the allocation when the process exits. That is common for shared-library constructors, audio backends, sanitizer runtimes, one-time FFT tables, TLS caches, and atexit cleanup paths. It is noisy in exactly the kind of test you are running: an empty program whose only job is to load DSOs and then exit.

Two things in your commands make the signal harder to read:

gcc -fsanitize=leak ... && valgrind ./a.out
gcc -fsanitize=undefined ... && valgrind ./a.out

That mixes Valgrind with sanitizer runtimes. The sanit…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jpka-
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants