llvm-project/compiler-rt/test
Diana Picus 47cf72c34c [sanitizers] Update sanitizers test to better match glibc internals
Reapply 282061.

One of the tests relying on sem_t's layout gets the wrong value for versions of
glibc newer than 2.21 on platforms that don't have 64-bit atomics (e.g. ARM).

This commit fixes the test to work with:
* versions of glibc >= 2.21 on platforms with 64-bit atomics: unchanged
* versions of glibc >= 2.21 on platforms without 64-bit atomics: the semaphore
value is shifted by SEM_VALUE_SHIFT (which is set to 1 in glibc's internal
headers)
* versions of glibc < 2.21: unchanged

The logic is complicated a bit by the fact that the sanitizers always pick the
oldest version of the symbol available in glibc, which creates discrepancies
between old platforms which contain several versions od the sem_init symbol, and
newer platforms which contain only one.

See the glibc 2.23 sources:
* sysdeps/nptl/internaltypes.h (struct new_sem for glibc >= 2.21 and
                                struct old_sem for glibc < 2.21)
* nptl/sem_getvalue.c

This was uncovered on one of the new buildbots that we are trying to move to
production.

Differential Revision: https://reviews.llvm.org/D24766

llvm-svn: 283299
2016-10-05 07:13:42 +00:00
..
BlocksRuntime
asan [asan] When protect_shadow_gap=0, set up the shadow for the shadow gap. This is needed to support NVIDIA CUDA drivers. Unfortunately, I don't know how to test it properly with CUDA on a public build bot, so adding a test that emulates the CUDA behavior. 2016-10-04 23:39:58 +00:00
builtins [compiler-rt][tests] cpu_model_test.c test fails to compile if X86 is not clang's default target 2016-08-18 14:39:39 +00:00
cfi cfi: Fixes for check-cfi when configured as an external project. 2016-09-22 20:51:48 +00:00
dfsan [mips] XFAIL the new mips64el compiler-rt tests that fail on clang-cmake-mipsel. 2016-08-12 11:56:36 +00:00
esan [ESan][MIPS] Fix tests struct-simple.cpp on MIPS 2016-09-22 08:36:54 +00:00
interception [Darwin] Exclude interception union tests on Darwin and Android 2016-08-04 04:46:39 +00:00
lsan [lsan] one more test fix to please the Debian Sid bot (this time, confirmed on the proper machine). Apparently, newer glibc uses slightly more stack 2016-08-25 19:08:10 +00:00
msan [msan] Disable flaky fork.cc on PPC64. 2016-09-23 23:41:44 +00:00
profile Fix the following tests when running under cross-compilation: 2016-09-23 17:40:40 +00:00
safestack [asan] Enable -asan-use-private-alias on Darwin/Mach-O, add test for ODR false positive with LTO (compiler-rt part) 2016-09-14 14:09:18 +00:00
sanitizer_common [sanitizers] Update sanitizers test to better match glibc internals 2016-10-05 07:13:42 +00:00
scudo [scudo] Fix an edge case in the secondary allocator 2016-09-30 19:57:21 +00:00
tsan tsan: support pie binaries on newer kernels 2016-09-22 13:42:02 +00:00
ubsan [ubsan] fix the test to me more resistent against changes in the sanitizer allocator 2016-08-24 21:03:28 +00:00
xray [compiler-rt][XRay] Initial per-thread inmemory logging implementation 2016-08-26 06:39:33 +00:00
CMakeLists.txt [CMake] Adding compiler-rt-test-depends target 2016-09-01 18:26:51 +00:00
lit.common.cfg [asan] Enable -asan-use-private-alias on Darwin/Mach-O, add test for ODR false positive with LTO (compiler-rt part) 2016-09-14 14:09:18 +00:00
lit.common.configured.in cfi: Fixes for check-cfi when configured as an external project. 2016-09-22 20:51:48 +00:00