summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_mutex.h
AgeCommit message (Collapse)Author
2017-12-14[Sanitizers] Basic sanitizer Solaris support (PR 33274)Kamil Rytarowski
Summary: This is the first mostly working version of the Sanitizer port to 32-bit Solaris/x86. It is currently based on Solaris 11.4 Beta. This part was initially developed inside libsanitizer in the GCC tree and should apply to both. Subsequent parts will address changes to clang, the compiler-rt build system and testsuite. I'm not yet sure what the right patch granularity is: if it's profitable to split the patch up, I'd like to get guidance on how to do so. Most of the changes are probably straightforward with a few exceptions: * The Solaris syscall interface isn't stable, undocumented and can change within an OS release. The stable interface is the libc interface, which I'm using here, if possible using the internal _-prefixed names. * While the patch primarily target 32-bit x86, I've left a few sparc changes in. They cannot currently be used with clang due to a backend limitation, but have worked fine inside the gcc tree. * Some functions (e.g. largefile versions of functions like open64) only exist in 32-bit Solaris, so I've introduced a separate SANITIZER_SOLARIS32 to check for that. The patch (with the subsequent ones to be submitted shortly) was tested on i386-pc-solaris2.11. Only a few failures remain, some of them analyzed, some still TBD: AddressSanitizer-i386-sunos :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos :: TestCases/malloc-no-intercept.c AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/concurrent_overflow.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/Posix/start-deactivated.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/default_options.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/log-path_test.cc AddressSanitizer-i386-sunos-dynamic :: TestCases/malloc-no-intercept.c SanitizerCommon-Unit :: ./Sanitizer-i386-Test/MemoryMappingLayout.DumpListOfModules SanitizerCommon-Unit :: ./Sanitizer-i386-Test/SanitizerCommon.PthreadDestructorIterations Maybe this is good enough the get the ball rolling. Reviewers: kcc, alekseyshl Reviewed By: alekseyshl Subscribers: srhines, jyknight, kubamracek, krytarowski, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40898 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320740 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-09Remove strict tid checks from the mac implementation of BlockingMutexFrancis Ricci
Summary: This patch unifies the behavior of BlockingMutex on linux and mac, resolving problems that can arise when BlockingMutex is used in code shared by the two platforms but has different behavior depending on the platform. No longer requires that the calling thread own the mutex for CheckLocked calls to pass. Reviewers: dvyukov, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29728 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294614 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30[Sanitizer] Make BlockingMutex really linker initialized.Yury Gribov
Differential Revision: http://reviews.llvm.org/D7171 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227560 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: better addr->object hashmapDmitry Vyukov
still experimental git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204126 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06tsan: weaken concurrency guarantees in deadlock detector mutex hashmapDmitry Vyukov
read locking on every access is too expensive git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203112 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04tsan: fix windows buildDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202831 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04tsan: add concurrent hashmap for standalone deadlock detectorDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-25Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17[asan] Fix a deadlock between asan's allocator and lsanKostya Serebryany
Summary: This fixes a deadlock which happens in lsan on a large memalign-allocated chunk that resides in lsan's root set. Reviewers: samsonov, earthdok Reviewed By: earthdok CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1957 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-14[Sanitizer] Add default constructor for BlockingMutexAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11[Sanitizer] Implement BlockingMutex::CheckLocked()Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14asan: fix compilation errors in mutexDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172385 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14asan/tsan: move blocking mutex from asan to sanitizer_commonDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11asan: faster quarantineDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172192 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30asan/tsan: first version of "stack depot"Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162897 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02asan/tsan: improve SpinMutexDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159518 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02tsan/asan: add mutex to 64-bit allocatorDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159516 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29tsan/asan: add SpinMutex to sanitizer_commonDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159439 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29tsan/asan: unify ScopedLockDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159438 91177308-0d34-0410-b5e6-96231b3b80d8