Skip to content

Commit e88b5fc

Browse files
committed
Revert to pre-llvm#98200 behavior for Android
1 parent 3f043e1 commit e88b5fc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,6 @@ void SetSigProcMask(__sanitizer_sigset_t *set, __sanitizer_sigset_t *oldset) {
169169
// Equivalently: newset[signum] = newset[signum] & oldset[signum]
170170
static void KeepUnblocked(__sanitizer_sigset_t &newset,
171171
__sanitizer_sigset_t &oldset, int signum) {
172-
// FIXME: Figure out why Android tests fail with internal_sigismember
173-
// See also: comment in BlockSignals().
174-
// In the meantime, we prefer to sometimes incorrectly unblock signals.
175172
if (SANITIZER_ANDROID || !internal_sigismember(&oldset, signum))
176173
internal_sigdelset(&newset, signum);
177174
}
@@ -181,9 +178,7 @@ static void KeepUnblocked(__sanitizer_sigset_t &newset,
181178
void BlockSignals(__sanitizer_sigset_t *oldset) {
182179
__sanitizer_sigset_t currentset;
183180
# if !SANITIZER_ANDROID
184-
// FIXME: SetSigProcMask and pthread_sigmask cause mysterious failures
185-
// See also: comment in KeepUnblocked().
186-
// In the meantime, we prefer to sometimes incorrectly unblock signals.
181+
// FIXME: SetSigProcMask cause mysterious failures on Android
187182
SetSigProcMask(NULL, &currentset);
188183
# endif
189184

@@ -200,9 +195,12 @@ void BlockSignals(__sanitizer_sigset_t *oldset) {
200195
// If this signal is blocked, such calls cannot be handled and the process may
201196
// hang.
202197
KeepUnblocked(newset, currentset, 31);
198+
# endif
203199

200+
# if SANITIZER_LINUX && !SANITIZER_ANDROID
204201
// Don't block synchronous signals
205202
// but also don't unblock signals that the user had deliberately blocked.
203+
// FIXME: this causes mysterious failures on Android
206204
KeepUnblocked(newset, currentset, SIGSEGV);
207205
KeepUnblocked(newset, currentset, SIGBUS);
208206
KeepUnblocked(newset, currentset, SIGILL);

0 commit comments

Comments
 (0)