[PATCH] Test failures in GCC ASan testsuite on ARM Linux due to FP format mismatch between libsanitizer and GCC.

Yury Gribov tetra2005 at gmail.com
Mon Sep 1 00:37:18 PDT 2014


================
Comment at: test/asan/TestCases/Linux/clang_gcc_abi.cc:14
@@ +13,3 @@
+  return s[three]; //BOOM
+// CHECK: #1 0x{{.*}} in boom {{.*}}clang_gcc_abi.cc:[[@LINE-2]]
+}
----------------
m.ostepenko wrote:
> samsonov wrote:
> > Just sanity checking: doesn't ASan output line 13 in the error report? (the one with the BOOM)
> Yes, it does.
> 
> ```
> =================================================================
> ==12410==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x422007f3 at pc 0x000c1444 bp 0x40800118 sp 0x40800110
> READ of size 1 at 0x422007f3 thread T0
>     #0 0xc1443 in boom /home/max/workspace/downloads/llvm/projects/compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc:13:3
>     #1 0xc1453 in gcc_abi /home/max/workspace/downloads/llvm/projects/compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc:19:3
>     #2 0xc1453 in gcc_abi /home/max/workspace/downloads/llvm/projects/compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc:19:3
>     #3 0xc1453 in gcc_abi /home/max/workspace/downloads/llvm/projects/compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc:19:3
> ```
> 
> ```
> SUMMARY: AddressSanitizer: heap-buffer-overflow /home/max/workspace/downloads/llvm/projects/compiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cc:13 boom
> ```
> 
> However, ASan unable to unwind the stack deeper then gcc_abi function. Should I do something about it?
That's expected - your inline asm lacks frame info so assembler can't generate proper unwind instructions which puzzles slow unwinder.

http://reviews.llvm.org/D4692






More information about the llvm-commits mailing list