]> granicus.if.org Git - python/commitdiff
bpo-37681: no_sanitize_thread support from GCC 5.1 (GH-15096)
authorHai Shi <shihai1992@gmail.com>
Wed, 14 Aug 2019 09:50:19 +0000 (04:50 -0500)
committerVictor Stinner <vstinner@redhat.com>
Wed, 14 Aug 2019 09:50:19 +0000 (11:50 +0200)
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored

Objects/obmalloc.c

index 8d5c700d5c1eb7c12ab7927e584e240725e01011..6ca7cd84eda822c3f614e41913f3f6390bc75727 100644 (file)
@@ -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