llvm-project/compiler-rt/lib
Rainer Orth f98a153c8d [sanitizer_common][tests] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/SanitizerCommon.PthreadDestructorIterations on Solaris
SanitizerCommon.PthreadDestructorIterations currently FAILs on Solaris:

  [ RUN      ] SanitizerCommon.PthreadDestructorIterations
  /vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_posix_test.cc:58: Failure
  Value of: destructor_executed
    Actual: true
  Expected: false
  [  FAILED  ] SanitizerCommon.PthreadDestructorIterations (1 ms)

It turns out that destructor is called 4 times after the first call to SpawnThread, but
5 times after the second.  While PTHREAD_DESTRUCTOR_ITERATIONS is 4 in
<limits.h>, the Solaris pthread_key_create(3C) man page documents

  If, after all the destructors have been called for all keys  with  non-
  null  values,  there  are  still  some  keys  with non-null values, the
  process will be repeated. POSIX requires that this process be  executed
  at   least   PTHREAD_DESTRUCTOR_ITERATIONS  times.  Solaris  calls  the
  destructors repeatedly until all values with associated destructors are
  NULL. Destructors that set new values can cause an infinite loop.

The patch adjusts the test case to allow for this.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 367705
2019-08-02 18:55:22 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan Fix flaky test caused by PR42868 2019-08-02 02:27:04 +00:00
builtins gn build: Fix redundant object files in builtin lib. 2019-07-31 17:08:34 +00:00
cfi Improve error message when '=' is missing in {ASAN,...}_OPTIONS. 2019-06-15 01:37:14 +00:00
crt Use CMAKE_C_COMPILER_ARG1 in compiler invocation 2019-05-19 03:29:15 +00:00
dfsan Try to heal bots more after r367551 2019-08-01 13:10:43 +00:00
fuzzer compiler-rt: Rename .cc file in lib/sanitizer_common to .cpp 2019-07-31 18:51:27 +00:00
gwp_asan Remove a few straggler ".cc"s in compiler-rt/lib 2019-08-01 17:53:25 +00:00
hwasan compiler-rt: Call a generated c++ file in hwasan .cpp instead of .cc 2019-08-01 14:48:16 +00:00
interception compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
lsan compiler-rt: Rename .cc file in lib/lsan to .cpp 2019-08-01 14:01:30 +00:00
msan Remove a few straggler ".cc"s in compiler-rt/lib 2019-08-01 17:53:25 +00:00
profile compiler-rt: Rename .cc file in lib/profile to .cpp 2019-07-31 18:21:08 +00:00
safestack compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
sanitizer_common [sanitizer_common][tests] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/SanitizerCommon.PthreadDestructorIterations on Solaris 2019-08-02 18:55:22 +00:00
scudo compiler-rt: Rename .cc file in lib/scudo/standalone/tests to .cpp 2019-08-01 14:38:49 +00:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan Remove a few straggler ".cc"s in compiler-rt/lib 2019-08-01 17:53:25 +00:00
ubsan Remove a few straggler ".cc"s in compiler-rt/lib 2019-08-01 17:53:25 +00:00
ubsan_minimal compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
xray compiler-rt: Rename .cc file in lib/xray/tests/unit to .cpp 2019-08-01 12:35:27 +00:00
CMakeLists.txt Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation" 2019-04-30 18:13:22 +00:00