QThread: disable pthread_clockjoin_np when building under TSAN
TSAN does not support intercepting pthread_clockjoin_np (only join, tryjoin and timedjoin), and will claim that an application leaks threads. Disable the clockjoin codepath when building under TSAN. Unfortunately I can't seem to find a version check for the sanitizers to apply here and know if and when TSAN will get this support. Change-Id: If12419e5d600e519bf4315d27f74d74a87dcf792 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 84d6309cf1eaf7632298d1305ce17f5f7497e1c0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
cb8a6a5ea9
commit
3e32c9b55b
@ -441,11 +441,18 @@ poll(&pfd, 1, 0);
|
||||
")
|
||||
|
||||
# pthread_clockjoin
|
||||
# As of GCC 15, TSAN does not support pthread_clockjoin_np,
|
||||
# so disable it in a TSAN build. Unfortunately there doesn't
|
||||
# seem to be a version check possible, just check the
|
||||
# TSAN_INTERCEPT macros into tsan_interceptors_posix.cpp.
|
||||
qt_config_compile_test(pthread_clockjoin
|
||||
LABEL "pthread_clockjoin()"
|
||||
LIBRARIES Threads::Threads
|
||||
CODE
|
||||
"#include <pthread.h>
|
||||
#if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
|
||||
#error
|
||||
#endif
|
||||
int main()
|
||||
{
|
||||
void *ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user