-
Notifications
You must be signed in to change notification settings - Fork 13k
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 leak check reports a "possibly lost" leak on std::thread::current()
#135608
Comments
Is this a full leakcheck? |
Yes. |
Based on the consensus in #133574, non-default full leakcheck is "convenience if we can, but no hard guarantees", removing regression and prioritize labels. |
std::thread::current()
(again)std::thread::current()
(I edited the issue title to better reflect this requires valgrind full leak check) |
To be clear, all a full leak check does is enable more logs. I get this even without full leak check:
So you can still see those 48 "possibly lost" bytes and wonder where they come from. IMO renaming this issue is misleading, and, again, IMO, feel free to disagree -- it's still a kind of regression. |
std::thread::current()
std::thread::current()
std::thread::current()
std::thread::current()
I did the initial triaging, I'll let the T-libs maintainers re-triage if this should be considered a regression. Thanks for the further clarifications. |
@joboet Is this an inevitable result of your preferred design for handling the thread allocations? |
This is basically an instance of #28129. After #127912, the destructor for the TLS variable behind I think this is fixed by #134085, which uses |
Code
I tried this code:
...under
valgrind
.I expected to see this happen: no leaks
Instead, this happened:
This is basically #133574 again. Calling this a regression might be stretching it a bit too far, but the consensus on that issue seemed to be that we should fix this if we can.
Version it worked on
It most recently worked on: Rust 1.85.0-beta.2, as far as I'm aware
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: