closes bpo-30364: Replace deprecated no_address_safety_analysis attri… · python/cpython@c0052f3 (original) (raw)
`@@ -31,8 +31,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
`
31
31
``
32
32
`#if defined(__has_feature) /* Clang */
`
33
33
`# if __has_feature(address_sanitizer) /* is ASAN enabled? */
`
34
``
`-
define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
`
35
``
`-
attribute((no_address_safety_analysis))
`
``
34
`+
define _Py_NO_SANITIZE_ADDRESS \
`
``
35
`+
attribute((no_sanitize("address")))
`
36
36
`# endif
`
37
37
`# if __has_feature(thread_sanitizer) /* is TSAN enabled? */
`
38
38
`# define _Py_NO_SANITIZE_THREAD attribute((no_sanitize_thread))
`
`@@ -42,8 +42,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
`
42
42
`# endif
`
43
43
`#elif defined(GNUC)
`
44
44
`# if defined(SANITIZE_ADDRESS) /* GCC 4.8+, is ASAN enabled? */
`
45
``
`-
define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
`
46
``
`-
attribute((no_address_safety_analysis))
`
``
45
`+
define _Py_NO_SANITIZE_ADDRESS \
`
``
46
`+
attribute((no_sanitize_address))
`
47
47
`# endif
`
48
48
`// TSAN is supported since GCC 5.1, but SANITIZE_THREAD macro
`
49
49
`// is provided only since GCC 7.
`
`@@ -52,8 +52,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
`
52
52
`# endif
`
53
53
`#endif
`
54
54
``
55
``
`-
#ifndef _Py_NO_ADDRESS_SAFETY_ANALYSIS
`
56
``
`-
define _Py_NO_ADDRESS_SAFETY_ANALYSIS
`
``
55
`+
#ifndef _Py_NO_SANITIZE_ADDRESS
`
``
56
`+
define _Py_NO_SANITIZE_ADDRESS
`
57
57
`#endif
`
58
58
`#ifndef _Py_NO_SANITIZE_THREAD
`
59
59
`# define _Py_NO_SANITIZE_THREAD
`
`@@ -1407,7 +1407,7 @@ obmalloc controls. Since this test is needed at every entry point, it's
`
1407
1407
`extremely desirable that it be this fast.
`
1408
1408
`*/
`
1409
1409
``
1410
``
`-
static bool _Py_NO_ADDRESS_SAFETY_ANALYSIS
`
``
1410
`+
static bool _Py_NO_SANITIZE_ADDRESS
`
1411
1411
`_Py_NO_SANITIZE_THREAD
`
1412
1412
`_Py_NO_SANITIZE_MEMORY
`
1413
1413
`address_in_range(void *p, poolp pool)
`