Fix Die() after pthread_exit call on macOS

Summary:
Scoped interceptor should not be used when calling real pthread_exit().
On macOS C++ destructors are not called by pthread_exit(), and later check for empty thread ignore set fails.

Patch by Yuri Per.

Reviewers: dvyukov, vitalybuka

Reviewed By: vitalybuka

Subscribers: vitalybuka, thegameg, kubamracek, jfb, llvm-commits, #sanitizers

Tags: #sanitizers, #llvm

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

llvm-svn: 353561
This commit is contained in:
Vitaly Buka 2019-02-08 20:43:26 +00:00
parent c716bee053
commit f333118ee0
1 changed files with 3 additions and 0 deletions

View File

@ -1051,6 +1051,9 @@ TSAN_INTERCEPTOR(int, pthread_detach, void *th) {
}
TSAN_INTERCEPTOR(void, pthread_exit, void *retval) {
{
SCOPED_INTERCEPTOR_RAW(pthread_exit, retval);
}
REAL(pthread_exit)(retval);
}