-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Reapply "[sanitizer_common] AND signals in BlockSignals instead of deleting (#113443)" for non-Android Linux only #115790
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
Changes from 1 commit
3f043e1
e88b5fc
5789cca
7558d41
8ec1550
625f812
a6988aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,9 +169,6 @@ void SetSigProcMask(__sanitizer_sigset_t *set, __sanitizer_sigset_t *oldset) { | |
| // Equivalently: newset[signum] = newset[signum] & oldset[signum] | ||
| static void KeepUnblocked(__sanitizer_sigset_t &newset, | ||
| __sanitizer_sigset_t &oldset, int signum) { | ||
| // FIXME: Figure out why Android tests fail with internal_sigismember | ||
| // See also: comment in BlockSignals(). | ||
| // In the meantime, we prefer to sometimes incorrectly unblock signals. | ||
| if (SANITIZER_ANDROID || !internal_sigismember(&oldset, signum)) | ||
| internal_sigdelset(&newset, signum); | ||
| } | ||
|
|
@@ -181,9 +178,7 @@ static void KeepUnblocked(__sanitizer_sigset_t &newset, | |
| void BlockSignals(__sanitizer_sigset_t *oldset) { | ||
| __sanitizer_sigset_t currentset; | ||
| # if !SANITIZER_ANDROID | ||
| // FIXME: SetSigProcMask and pthread_sigmask cause mysterious failures | ||
| // See also: comment in KeepUnblocked(). | ||
| // In the meantime, we prefer to sometimes incorrectly unblock signals. | ||
| // FIXME: SetSigProcMask cause mysterious failures on Android | ||
|
||
| SetSigProcMask(NULL, ¤tset); | ||
| # endif | ||
|
|
||
|
|
@@ -200,9 +195,12 @@ void BlockSignals(__sanitizer_sigset_t *oldset) { | |
| // If this signal is blocked, such calls cannot be handled and the process may | ||
| // hang. | ||
| KeepUnblocked(newset, currentset, 31); | ||
| # endif | ||
|
|
||
| # if SANITIZER_LINUX && !SANITIZER_ANDROID | ||
| // Don't block synchronous signals | ||
| // but also don't unblock signals that the user had deliberately blocked. | ||
| // FIXME: this causes mysterious failures on Android | ||
| KeepUnblocked(newset, currentset, SIGSEGV); | ||
| KeepUnblocked(newset, currentset, SIGBUS); | ||
thurstond marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| KeepUnblocked(newset, currentset, SIGILL); | ||
|
|
||
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.
unused current set warning is possible on non-linux.
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, will fix
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.
we still need
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.
Oops, thank you!