File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
compiler-rt/lib/sanitizer_common Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -218,13 +218,12 @@ bool IsSignalHandlerFromSanitizer(int signum) {
218218}
219219
220220bool SetSignalHandlerFromSanitizer (int signum, bool new_state) {
221- bool old_state = false ;
222- if (signum >= 0 && static_cast <unsigned >(signum) <
223- ARRAY_SIZE (signal_handler_is_from_sanitizer))
224- old_state = atomic_exchange (&signal_handler_is_from_sanitizer[signum],
225- new_state, memory_order_relaxed);
221+ if (signum < 0 || static_cast <unsigned >(signum) >=
222+ ARRAY_SIZE (signal_handler_is_from_sanitizer))
223+ return false ;
226224
227- return old_state;
225+ return atomic_exchange (&signal_handler_is_from_sanitizer[signum], new_state,
226+ memory_order_relaxed);
228227}
229228
230229static void MaybeInstallSigaction (int signum,
You can’t perform that action at this time.
0 commit comments