Skip to content

Commit 8c5e14c

Browse files
committed
Undo API addition
1 parent 5d7e930 commit 8c5e14c

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed

compiler-rt/include/sanitizer/common_interface_defs.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,6 @@ void SANITIZER_CDECL __sanitizer_finish_switch_fiber(void *fake_stack_save,
485485
int SANITIZER_CDECL __sanitizer_get_module_and_offset_for_pc(
486486
void *pc, char *module_path, size_t module_path_len, void **pc_offset);
487487

488-
// If cloak_sanitizer_signal_handlers() is set, signal/sigaction will pretend
489-
// that sanitizers did not preinstall any signal handlers. This function clears
490-
// the cloaking state.
491-
void SANITIZER_CDECL __sanitizer_uncloak_preinstalled_signal_handlers();
492-
493488
#ifdef __cplusplus
494489
} // extern "C"
495490
#endif

compiler-rt/lib/sanitizer_common/sanitizer_common.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,6 @@ int __sanitizer_install_malloc_and_free_hooks(void (*malloc_hook)(const void *,
418418
return InstallMallocFreeHooks(malloc_hook, free_hook);
419419
}
420420

421-
SANITIZER_INTERFACE_ATTRIBUTE
422-
void __sanitizer_uncloak_preinstalled_signal_handlers() {
423-
internal_memset(signal_handler_is_from_sanitizer, 0,
424-
sizeof(signal_handler_is_from_sanitizer));
425-
}
426-
427421
// Provide default (no-op) implementation of malloc hooks.
428422
SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_malloc_hook, void *ptr,
429423
uptr size) {

compiler-rt/lib/sanitizer_common/sanitizer_common_interface.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ INTERFACE_WEAK_FUNCTION(__sanitizer_on_print)
2424
INTERFACE_WEAK_FUNCTION(__sanitizer_report_error_summary)
2525
INTERFACE_WEAK_FUNCTION(__sanitizer_sandbox_on_notify)
2626
INTERFACE_WEAK_FUNCTION(__sanitizer_get_dtls_size)
27-
INTERFACE_FUNCTION(__sanitizer_uncloak_preinstalled_signal_handlers)
2827
// Sanitizer weak hooks
2928
INTERFACE_WEAK_FUNCTION(__sanitizer_weak_hook_memcmp)
3029
INTERFACE_WEAK_FUNCTION(__sanitizer_weak_hook_strcmp)

compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
// Flaky errors in debuggerd with "waitpid returned unexpected pid (0)" in logcat.
2424
// UNSUPPORTED: android && i386-target-arch
2525

26-
#include <sanitizer/common_interface_defs.h>
26+
// Note: this test case is unusual because it retrieves the original
27+
// (ASan-installed) signal handler; thus, it is incompatible with the
28+
// cloak_sanitizer_signal_handlers runtime option.
29+
2730
#include <signal.h>
2831
#include <stdio.h>
2932
#include <stdlib.h>
@@ -69,10 +72,6 @@ bool InstallHandler(int signum, struct sigaction *original_sigaction) {
6972
}
7073

7174
int main() {
72-
// This test case is unusual because it retrieves the original
73-
// (ASan-installed) signal handler; thus, we don't want ASan to cloak them.
74-
__sanitizer_uncloak_preinstalled_signal_handlers();
75-
7675
// Let's install handlers for both SIGSEGV and SIGBUS, since pre-Yosemite
7776
// 32-bit Darwin triggers SIGBUS instead.
7877
if (InstallHandler(SIGSEGV, &original_sigaction_sigsegv) &&

0 commit comments

Comments
 (0)