diff options
-rw-r--r-- | include/sanitizer/asan_interface.h | 5 | ||||
-rw-r--r-- | lib/asan/asan_globals.cc | 18 | ||||
-rw-r--r-- | lib/asan/asan_rtl.cc | 1 |
3 files changed, 0 insertions, 24 deletions
diff --git a/include/sanitizer/asan_interface.h b/include/sanitizer/asan_interface.h index 6e8ae8723..6afc3800f 100644 --- a/include/sanitizer/asan_interface.h +++ b/include/sanitizer/asan_interface.h @@ -28,11 +28,6 @@ extern "C" { // before any instrumented code is executed and before any call to malloc. void __asan_init() SANITIZER_INTERFACE_ATTRIBUTE; - // This function should be called by the instrumented code. - // 'addr' is the address of a global variable called 'name' of 'size' bytes. - void __asan_register_global(uptr addr, uptr size, const char *name) - SANITIZER_INTERFACE_ATTRIBUTE; - // This structure describes an instrumented global variable. struct __asan_global { uptr beg; // The address of the global. diff --git a/lib/asan/asan_globals.cc b/lib/asan/asan_globals.cc index 1cd9e517f..4e18bb8e2 100644 --- a/lib/asan/asan_globals.cc +++ b/lib/asan/asan_globals.cc @@ -55,11 +55,6 @@ void PoisonRedZones(const Global &g) { } } -static uptr GetAlignedSize(uptr size) { - return ((size + kGlobalAndStackRedzone - 1) / kGlobalAndStackRedzone) - * kGlobalAndStackRedzone; -} - bool DescribeAddressIfGlobal(uptr addr) { if (!flags()->report_globals) return false; BlockingMutexLock lock(&mu_for_globals); @@ -142,19 +137,6 @@ static void UnpoisonGlobal(const Global *g) { // ---------------------- Interface ---------------- {{{1 using namespace __asan; // NOLINT -// Register one global with a default redzone. -void __asan_register_global(uptr addr, uptr size, - const char *name) { - if (!flags()->report_globals) return; - BlockingMutexLock lock(&mu_for_globals); - Global *g = (Global *)allocator_for_globals.Allocate(sizeof(Global)); - g->beg = addr; - g->size = size; - g->size_with_redzone = GetAlignedSize(size) + kGlobalAndStackRedzone; - g->name = name; - RegisterGlobal(g); -} - // Register an array of globals. void __asan_register_globals(__asan_global *globals, uptr n) { if (!flags()->report_globals) return; diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc index 35ad20317..11adbee5b 100644 --- a/lib/asan/asan_rtl.cc +++ b/lib/asan/asan_rtl.cc @@ -231,7 +231,6 @@ static NOINLINE void force_interface_symbols() { case 8: __asan_report_store4(0); break; case 9: __asan_report_store8(0); break; case 10: __asan_report_store16(0); break; - case 11: __asan_register_global(0, 0, 0); break; case 12: __asan_register_globals(0, 0); break; case 13: __asan_unregister_globals(0, 0); break; case 14: __asan_set_death_callback(0); break; |