From 6cf72ad3b3d4e475a25b7879f28996a78c8f62e5 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 28 Aug 2020 01:59:27 -0700 Subject: [PATCH] [NFC][asan] Don't unwind stack before pool check --- compiler-rt/lib/asan/asan_malloc_linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cpp b/compiler-rt/lib/asan/asan_malloc_linux.cpp index faa8968a5d00..cb6c0ced0494 100644 --- a/compiler-rt/lib/asan/asan_malloc_linux.cpp +++ b/compiler-rt/lib/asan/asan_malloc_linux.cpp @@ -120,19 +120,19 @@ static void *ReallocFromLocalPool(void *ptr, uptr size) { } INTERCEPTOR(void, free, void *ptr) { - GET_STACK_TRACE_FREE; if (UNLIKELY(IsInDlsymAllocPool(ptr))) { DeallocateFromLocalPool(ptr); return; } + GET_STACK_TRACE_FREE; asan_free(ptr, &stack, FROM_MALLOC); } #if SANITIZER_INTERCEPT_CFREE INTERCEPTOR(void, cfree, void *ptr) { - GET_STACK_TRACE_FREE; if (UNLIKELY(IsInDlsymAllocPool(ptr))) return; + GET_STACK_TRACE_FREE; asan_free(ptr, &stack, FROM_MALLOC); } #endif // SANITIZER_INTERCEPT_CFREE @@ -304,4 +304,4 @@ void ReplaceSystemMalloc() { #endif // SANITIZER_ANDROID #endif // SANITIZER_FREEBSD || SANITIZER_FUCHSIA || SANITIZER_LINUX || - // SANITIZER_NETBSD || SANITIZER_SOLARIS + // SANITIZER_NETBSD || SANITIZER_SOLARIS \ No newline at end of file