-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SystemSan: use tgkill on precise pid #8615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'm finding this a bit hard to follow though. Can you please explain what this is doing and why the previous approach (just by tracking g_root_pid
) wasn't sufficient?
ThreadParent() : pid(0) {}; | ||
ThreadParent(pid_t pid) : pid(pid) {} | ||
}; | ||
// Map of the created PID/TID to its creator PID/TID or 0 if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or 0 if ? please finish the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better comment put
4cffa10
to
8e80aba
Compare
With the previous approach, we did not get the right stack trace (ie the one with I tried to improve the comments... Let me know what you think. |
By the way, for golang, the problem is that libFuzzer does not know how to print a stack trace of a Golang program A way to get a good stack trace is to do a bit like for coverage :
So, we can see
This pure golang program is
|
Ping on this ? I pushed a new version that I could successfully test with all
Previously, the stack trace obtained with The subtlety was that for shell corruption, we have to kill the parent (when for arbitrary file open or other normal cases, we kill the current pid/tid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Thanks!
This patch is meant for `tgkill` to use the right thread, so that we get the right stack trace every time
cc @oliverchang @alan32liu
This patch is meant for
tgkill
to use the right thread, so that we get the right stack trace every time