bpo-37681: no_sanitize_thread support from GCC 5.1 (GH-15096)

Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored
This commit is contained in:
Hai Shi 2019-08-14 04:50:19 -05:00 committed by Victor Stinner
parent 43d564c18c
commit 7e479c8221

View File

@ -45,9 +45,9 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \ # define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis)) __attribute__((no_address_safety_analysis))
# endif # 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. // 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)) # define _Py_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
# endif # endif
#endif #endif