llvm-project/compiler-rt/lib
Kamil Rytarowski d7c85137aa Correct NetBSD support in pthread_once(3)/TSan
Summary:
The pthread_once(3)/NetBSD type is built with the following structure:

struct __pthread_once_st {
 pthread_mutex_t pto_mutex;
 int pto_done;
};

Set the pto_done position as shifted by __sanitizer::pthread_mutex_t_sz
from the beginning of the pthread_once struct.

This corrects deadlocks when the pthread_once(3) function
is used.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, dvyukov, vitalybuka

Reviewed By: dvyukov

Subscribers: llvm-commits, kubamracek, #sanitizers

Tags: #sanitizers

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

llvm-svn: 318742
2017-11-21 09:36:07 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [sanitizers] Add init function to set alignment of low level allocator 2017-11-21 01:01:32 +00:00
builtins [X86] Add cpu detection for cannonlake. 2017-11-19 00:46:21 +00:00
cfi (NFC) Rename GetMax{,User}VirtualAddress. 2017-11-07 23:51:22 +00:00
dfsan [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
esan [esan] Fix compilation of signal handlers 2017-11-10 05:41:13 +00:00
fuzzer [fuzzer] Initialize PcDescr buffer before calling __sanitizer_symbolize_pc 2017-11-17 00:46:59 +00:00
interception sanitizer_common: Try looking up symbols with RTLD_DEFAULT if RTLD_NEXT does not work. 2017-11-10 22:09:37 +00:00
lsan [LSan] Export __lsan_init 2017-11-15 23:42:48 +00:00
msan [msan] Fix signal chaining 2017-11-11 03:03:34 +00:00
profile [profile] Update InstrProfData.inc to sync with llvm 2017-11-14 23:57:58 +00:00
safestack Enable SafeStack on NetBSD 2017-08-10 18:40:09 +00:00
sanitizer_common Correct NetBSD support in pthread_once(3)/TSan 2017-11-21 09:36:07 +00:00
scudo [scudo] Soft and hard RSS limit checks 2017-11-15 16:40:27 +00:00
stats Support compiler-rt builtins 2017-07-28 03:39:38 +00:00
tsan Correct NetBSD support in pthread_once(3)/TSan 2017-11-21 09:36:07 +00:00
ubsan [sanitizers] Rename GetStackTraceWithPcBpAndContext 2017-11-09 07:53:06 +00:00
ubsan_minimal [ubsan-minimal] Get rid of the libc++ dependency. 2017-11-11 02:32:02 +00:00
xray [XRay][compiler-rt] Migrate basic mode logging to the XRay framework 2017-11-21 07:29:21 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00