hanchenye-llvm-project/compiler-rt/lib/tsan
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
..
benchmarks
dd [sanitizer] Move cxx-abi library earlier in link flags. 2017-10-04 23:35:14 +00:00
go Add NetBSD improvements in sanitizers 2017-10-25 17:09:05 +00:00
rtl Correct NetBSD support in pthread_once(3)/TSan 2017-11-21 09:36:07 +00:00
tests Add NetBSD improvements in sanitizers 2017-10-25 17:09:05 +00:00
.clang-format
CMakeLists.txt Fix CMake definitions of tsan runtime to make it installed by "install-compiler-rt" 2017-11-04 00:07:20 +00:00
analyze_libtsan.sh [TSan] Slightly improve check_analyze script. 2015-12-07 20:18:50 +00:00
check_analyze.sh [TSan] Update test values 2017-08-18 19:22:39 +00:00
check_cmake.sh