-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valgrind does not understand musl's malloc? #15
Comments
It seems like Valgrind doesn't really understand musl's malloc. It fails to detect the memory leak in a trivial program.
I think the root cause might be that it simply doesn't understand musl's malloc, so it's raising a bunch of errors when it thinks that malloc is doing invalid things, and it is not recognizing the pieces of memory allocated by that malloc as leaks at the end of the program. |
Interesting. Don't have a solution but some thoughts and tidbits that might be useful:
|
Hey, sorry, I haven't gotten around to looking into these suggestions. It's nice to have someone with your caliber helping out though! |
I will have a look at compiling statically and then running Valgrind. Experiencing the same issue when I run |
Hi @jsarenik. In case it wasn't clear, I was compiling everything statically and encountering the error. From what Will is saying, it sounds like Valgrind might work better if Musl is linked dynamically instead, but I have not tried that. |
@DavidEGrayson - thank you. Yes, I misunderstood this bit. |
I think it is more likely that your C compiler is optimizing out the unused call to |
When I run valgrind on a program compiled for i686 Linux with Nixcrpkgs, I get lots of errors that look like this:
The command I am using is:
I think these errors are coming from musl and I should try compiling it with debug symbols enabled to get more information.
The text was updated successfully, but these errors were encountered: