From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 14 Aug 2019 10:16:54 +0000 (-0700) Subject: bpo-37681: no_sanitize_thread support from GCC 5.1 (GH-15096) X-Git-Tag: v3.7.5rc1~190 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15b6d0a712c08557a605f49034f8ad392985144c;p=thirdparty%2FPython%2Fcpython.git 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 7e479c82218450255572e3f5fa1549dc283901ea) Co-authored-by: Hai Shi --- diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 885ad537ad95..8446efcbd440 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -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