Fast unwind is disabled for aarch64. Following suit. This patch fixes the following lit tests:
Linux/malloc_delete_mismatch.cc
Posix/start-deactivated.cc
deep_stack_uaf.cc
double-free.cc
invalid-free.cc
large_func_test.cc
Differential D3814
[asan] disable fast unwind on ARM garious on May 16 2014, 6:44 PM. Authored by
Details
Diff Detail Event TimelineComment Actions We do use fast unwind on Android ARM -- it is a performance-critical Comment Actions Per Kostya, this version does not disable fast unwind on Android. With this patch, the error messages are significantly more useful. Without this patch, in the use-after-free test for example, the stack trace only has references to the 'malloc/free' wrappers in the ASan runtime and not references to anything in use-after-free.cc. Comment Actions I think this is a mistake. Note also, that there are run-time flags that control the unwinder: Comment Actions Fast stack unwind should work on ARM for Clang-compiled code, no matter Android or not. Comment Actions
AFAIK supporting frame pointer violates standard ARM ABIs so this will force user to recompile complete stack (glibc and other system libs). That's perfectly fine for some users but I doubt about majority. Are we sure that fast_unwind_on_malloc should be default on platforms without default frame pointer? Comment Actions It's quite uncommon to have frame pointers in glibc or system libraries anyway, even on x86 linux. Comment Actions
Ok, you win. Comment Actions
It requires -marm -fno-omit-frame-pointer. Hmm, I'm not seeing that. Zooming in on "TestCases/double-free.cc", I see that it is being compiled with -fno-omit-frame-pointer (and -marm is the default for armv7 targets). I double-checked and recompiled with those flags tacked onto the end of the clang invocation, but the result is the same: ==12127==ERROR: AddressSanitizer: attempting double-free on 0x41e007f0 in thread T0: #0 0x7269b in free compiler-rt/lib/asan/asan_malloc_linux.cc:65 #1 0x896e3 in main compiler-rt/test/asan/TestCases/double-free.cc:15 LLVMSymbolizer: error reading file: No such file or directory. #2 0x40a142cb (/lib/arm-linux-gnueabi/libc.so.6+0x182cb) 0x41e007f0 is located 0 bytes inside of 10-byte region [0x41e007f0,0x41e007fa) freed by thread T0 here: #0 0x7269b in free compiler-rt/lib/asan/asan_malloc_linux.cc:65 previously allocated by thread T0 here: #0 0x72859 in malloc compiler-rt/lib/asan/asan_malloc_linux.cc:75 SUMMARY: AddressSanitizer: double-free compiler-rt/lib/asan/asan_malloc_linux.cc:65 free ==12127==ABORTING What am I missing? |