The thread specific key wasn't not released.
Running the unittest in loop will fail after 1024 iteraions.
./projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test --gtest_filter=SanitizerCommon.PthreadDestructorIterations --gtest_repeat=2000 --gtest_break_on_failure
Repeating all tests (iteration 1023) . . . Note: Google Test filter = SanitizerCommon.PthreadDestructorIterations [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from SanitizerCommon [ RUN ] SanitizerCommon.PthreadDestructorIterations /usr/local/google/home/etienneb/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cc:54: Failure Value of: pthread_key_create(&key, &destructor) Actual: 11 Expected: 0 Aborted (core dumped)