-
Notifications
You must be signed in to change notification settings - Fork 997
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
LSan: leaks should report PID and TID of allocation #1236
Comments
PID is already printed:
By TID, do you mean something like pthread_self, or internal ASan's/LSan's thread-id? It's possible to print ASan's thread ID with a patch below.
But why would you need the TIDs to be printed? Adding it to LSan (standalone, -fsanitize=leak) is a bit more involved since the standalone lsan allocator doesn't track thread ids. Not sure if it's worth the effort though - I don't know if standalone lsan is frequently used.
|
I was thinking something like pthread_self(), yes. But If this increases the size of allocation information, it's probably not worth it, though it looks like it won't increase size. I am not sure how helpful the information would be for debugging leaks, actually. So feel free to close this issue if you don't see a benefit to doing it. |
LSan is ~7 years old and you are the first one to ask for TIDs in leak reports. |
Please leave it as it is then. And thank you. |
It would be much easier to find the source of a leak if LSan reported the PID and TID of the process and thread that allocated the leaked memory. Originally submitted here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94448
The text was updated successfully, but these errors were encountered: