tsan: refactor atexit handling
authorDmitry Vyukov <dvyukov@google.com>
Tue, 14 Oct 2014 09:32:45 +0000 (09:32 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 14 Oct 2014 09:32:45 +0000 (09:32 +0000)
commitea2f3bffca04ebb3fd91949ae5f0c5b1c6ff015f
treee589f8b8a91cb81486fb1bd868063ce3c4171f2c
parent7c558cf4d6b9a21766f71159463d5a50a133a486
tsan: refactor atexit handling
The current handling (manual execution of atexit callbacks)
is overly complex and leads to constant problems due to mutual ordering of callbacks.
Instead simply wrap callbacks into our wrapper to establish
the necessary synchronization.
Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=80

llvm-svn: 219675
compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/test/tsan/dlclose.cc [new file with mode: 0644]