-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
It seems we got memory leaking? #108791
Comments
I'm guessing this is either a Valgrind bug or a FreeBSD-specific issue, I can't reproduce this |
Which version of Valgrind are you both using? 3.20.0 and...? It was for some time a known Valgrind issue that the tool would complain about memory that was deliberately left to be cleaned up by the process end. Perhaps they fixed it. |
Oh, nevermind, 3.20 is the latest. I got nothin'. It looks like the issue is mostly some thread-setup structures, including the stdio lock. That's all intentional. |
Both 3.19 and 3.20 report no issues. #13420 made me wonder if this was something similar |
Mine is So, I think I leave this issue open, then other people will dive deep to have a look? :) |
From the Valgrind FAQ, 5.2.:
So, per the Valgrind user manual, it's not an issue, and "definitely lost" and "still reachable" are not the same. |
still reachable usually means that the program deliberately left some memory behind to be cleaned up by the os, os cleanup is actually faster than manually calling dealoc on all the memory, so it makes sense that rustc would leave the memory behind to be cleaned up by the os(the program is done anyways :)). |
I tried this code:
I expected to see this happen: Should no unfreed memory exists
Instead, this happeneed: But it seems memory is still reachable?
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: