-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove alternate stack with sigaltstack before unmaping it. #31684
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
Conversation
Handler { _data: stack.ss_sp as *mut libc::c_void } | ||
let mut stack = mem::zeroed(); | ||
sigaltstack(ptr::null(), &mut stack); | ||
if stack.ss_flags & SS_DISABLE != 0 { |
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.
Could you add a comment explaining what this check is doing? I think it's just checking to see if one's already set, right?
Thanks @tmiasko! |
I have added comment before checking for SS_DISABLE, |
@bors: r+ 4022ff164884a4628ac9498c9d9557cca643c8bb |
⌛ Testing commit 4022ff1 with merge ec445e3... |
💔 Test failed - auto-mac-64-opt |
Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves.
The buildbot test failure on Mac OS is real. While I don't have Mac to test I incorporated a workaround that passes SIGSTKSZ when disabling the stack. |
Remove alternate stack with sigaltstack before unmaping it. Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves. This change depends on SS_DISABLE recently introduced in libc crate and updates this git submodule accordingly.
Remove alternate stack with sigaltstack before unmaping it.
Also reuse existing signal stack if already set, this is especially
useful when working with sanitizers that configure alternate stack
themselves.
This change depends on SS_DISABLE recently introduced in libc crate and updates
this git submodule accordingly.