mirror of
https://github.com/python/cpython.git
synced 2026-05-03 00:58:30 +00:00
[3.12] gh-112536: Define _Py_THREAD_SANITIZER on GCC when TSan is enabled (GH-117702) (#117713)
gh-112536: Define `_Py_THREAD_SANITIZER` on GCC when TSan is enabled (GH-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.
(cherry picked from commit 79eec66e3d)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
653ed76442
commit
04d07964f2
1 changed files with 3 additions and 0 deletions
|
|
@ -757,6 +757,9 @@ extern char * _getpty(int *, int, mode_t, int);
|
|||
# if defined(__SANITIZE_ADDRESS__)
|
||||
# define _Py_ADDRESS_SANITIZER
|
||||
# endif
|
||||
# if defined(__SANITIZE_THREAD__)
|
||||
# define _Py_THREAD_SANITIZER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue