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
(cherry picked from commit 7e479c8221)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-08-14 03:16:54 -07:00 committed by GitHub
parent fbb0c032e8
commit 15b6d0a712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -44,9 +44,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