summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer_common][tests] Fix SanitizerCommon-Unit :: ↵Rainer Orth2019-08-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./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
* compiler-rt: Rename .cc file in lib/sanitizer_common/tests to .cppNico Weber2019-07-311-0/+80
See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $(basename $f) . ; done and manually updated references to renamed files found by that. llvm-svn: 367467
OpenPOWER on IntegriCloud