summaryrefslogtreecommitdiff
path: root/lib/asan/asan_win_dll_thunk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/asan_win_dll_thunk.cc')
-rw-r--r--lib/asan/asan_win_dll_thunk.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/asan/asan_win_dll_thunk.cc b/lib/asan/asan_win_dll_thunk.cc
index 4b8a08c5e..870286d54 100644
--- a/lib/asan/asan_win_dll_thunk.cc
+++ b/lib/asan/asan_win_dll_thunk.cc
@@ -199,23 +199,21 @@ static void InterceptHooks();
// ----------------- ASan own interface functions --------------------
// Don't use the INTERFACE_FUNCTION machinery for this function as we actually
// want to call it in the __asan_init interceptor.
-WRAP_W_V(__asan_should_detect_stack_use_after_return)
-
extern "C" {
int __asan_option_detect_stack_use_after_return;
+ uptr __asan_shadow_memory_dynamic_address;
// Manually wrap __asan_init as we need to initialize
// __asan_option_detect_stack_use_after_return afterwards.
void __asan_init() {
- typedef void (*fntype)();
+ typedef void (*fntype)(int*, uptr*);
static fntype fn = 0;
// __asan_init is expected to be called by only one thread.
if (fn) return;
- fn = (fntype)getRealProcAddressOrDie("__asan_init");
- fn();
- __asan_option_detect_stack_use_after_return =
- (__asan_should_detect_stack_use_after_return() != 0);
+ fn = (fntype)getRealProcAddressOrDie("__asan_init_from_dll");
+ fn(&__asan_option_detect_stack_use_after_return,
+ &__asan_shadow_memory_dynamic_address);
InterceptHooks();
}