Skip to content

Commit

Permalink
bpo-37681: no_sanitize_thread support from GCC 5.1 (pythonGH-15096)
Browse files Browse the repository at this point in the history
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored
  • Loading branch information
shihai1991 authored and vstinner committed Aug 14, 2019
1 parent 43d564c commit 7e479c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis))
# endif
// TSAN is supported since GCC 4.8, but __SANITIZE_THREAD__ macro
// TSAN is supported since GCC 5.1, but __SANITIZE_THREAD__ macro
// is provided only since GCC 7.
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
# if __GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
# define _Py_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
# endif
#endif
Expand Down

0 comments on commit 7e479c8

Please sign in to comment.