diff options
author | Sam Gross <colesbury@gmail.com> | 2024-04-10 14:20:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 14:20:05 (GMT) |
commit | 79eec66e3dc277ea6ebad8c0b33756eea6a7ab3b (patch) | |
tree | 412bb312bdce75fda19bb9145694711cbe8b3e90 /Include/pyport.h | |
parent | ef4118222b6d5f4532a2f1e234ba03955348d2a1 (diff) | |
download | cpython-79eec66e3dc277ea6ebad8c0b33756eea6a7ab3b.zip cpython-79eec66e3dc277ea6ebad8c0b33756eea6a7ab3b.tar.gz cpython-79eec66e3dc277ea6ebad8c0b33756eea6a7ab3b.tar.bz2 |
gh-112536: Define `_Py_THREAD_SANITIZER` on GCC when TSan is enabled (#117702)
The `__has_feature(thread_sanitizer)` is a Clang-ism. Although new
versions of GCC implement `__has_feature`, the `defined(__has_feature)`
check still fails on GCC so we don't use that code path.
Diffstat (limited to 'Include/pyport.h')
-rw-r--r-- | Include/pyport.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index 9d7ef00..2ba81a4 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -572,6 +572,9 @@ extern "C" { # if defined(__SANITIZE_ADDRESS__) # define _Py_ADDRESS_SANITIZER # endif +# if defined(__SANITIZE_THREAD__) +# define _Py_THREAD_SANITIZER +# endif #endif |