[LLVMdev] ASan and UBSan Test Failures
Meador Inge
meadori at codesourcery.com
Fri Jan 4 18:37:16 PST 2013
Some more information …
On Jan 4, 2013, at 6:56 PM, Meador Inge wrote:
> I am building LLVM on OS X 10.7.5 with cmake. Under this configuration some ASan and UBSan tests
> are failing:
>
> $ make check-ubsan
>
> …
>
> ********************
> Testing Time: 2.36s
> ********************
> Failing Tests (11):
> UndefinedBehaviorSanitizer :: Float/cast-overflow.cpp
> UndefinedBehaviorSanitizer :: Integer/add-overflow.cpp
> UndefinedBehaviorSanitizer :: Integer/div-zero.cpp
> UndefinedBehaviorSanitizer :: Integer/no-recover.cpp
> UndefinedBehaviorSanitizer :: Integer/sub-overflow.cpp
> UndefinedBehaviorSanitizer :: Integer/uadd-overflow.cpp
> UndefinedBehaviorSanitizer :: Integer/usub-overflow.cpp
> UndefinedBehaviorSanitizer :: Misc/bool.cpp
> UndefinedBehaviorSanitizer :: Misc/enum.cpp
> UndefinedBehaviorSanitizer :: TypeCheck/misaligned.cpp
> UndefinedBehaviorSanitizer :: TypeCheck/null.cpp
>
> Expected Passes : 10
> Expected Failures : 1
> Unexpected Failures: 11
These tests fail with the following assertion:
==40116== Sanitizer CHECK failed: /Users/meadori/Code/src/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc:26 ((0 && "unimplemented")) != (0) (0, 0)
Should these tests be running? StartSymbolizerSubprocess and GetListOfModules are
not implemented for OS X.
> $ make check-asan
>
> …
>
> ********************
> Testing Time: 125.18s
> ********************
> Failing Tests (1):
> AddressSanitizer :: use-after-free.cc
>
This failure seems to be due to adding ALWAYS_INLINE to 'free_common' in r158885.
I think fixing the stack trace checks in use-after-free.cc will do:
- // CHECK-Darwin: {{ #0 0x.* in .*free_common.*}}
- // CHECK-Darwin: {{ #1 0x.* in .*mz_free.*}}
+ // CHECK-Darwin: {{ #0 0x.* in .*mz_free.*}}
// We override free() on Darwin, thus no malloc_zone_free
- // CHECK-Darwin: {{ #2 0x.* in _?wrap_free}}
- // CHECK-Darwin: {{ #3 0x.* in _?main .*use-after-free.cc:21}}
+ // CHECK-Darwin: {{ #1 0x.* in _?wrap_free}}
+ // CHECK-Darwin: {{ #2 0x.* in _?main .*use-after-free.cc:21}}
--
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software
More information about the llvm-dev
mailing list