mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
closes bpo-30364: Replace deprecated no_address_safety_analysis attribute. (GH-17702)
This commit is contained in:
parent
f460eea5c5
commit
c0052f3fe3
1 changed files with 7 additions and 7 deletions
|
@ -31,8 +31,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
|
||||||
|
|
||||||
#if defined(__has_feature) /* Clang */
|
#if defined(__has_feature) /* Clang */
|
||||||
# if __has_feature(address_sanitizer) /* is ASAN enabled? */
|
# if __has_feature(address_sanitizer) /* is ASAN enabled? */
|
||||||
# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
|
# define _Py_NO_SANITIZE_ADDRESS \
|
||||||
__attribute__((no_address_safety_analysis))
|
__attribute__((no_sanitize("address")))
|
||||||
# endif
|
# endif
|
||||||
# if __has_feature(thread_sanitizer) /* is TSAN enabled? */
|
# if __has_feature(thread_sanitizer) /* is TSAN enabled? */
|
||||||
# define _Py_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
|
# define _Py_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
|
||||||
|
@ -42,8 +42,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
# if defined(__SANITIZE_ADDRESS__) /* GCC 4.8+, is ASAN enabled? */
|
# if defined(__SANITIZE_ADDRESS__) /* GCC 4.8+, is ASAN enabled? */
|
||||||
# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \
|
# define _Py_NO_SANITIZE_ADDRESS \
|
||||||
__attribute__((no_address_safety_analysis))
|
__attribute__((no_sanitize_address))
|
||||||
# endif
|
# endif
|
||||||
// TSAN is supported since GCC 5.1, 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.
|
||||||
|
@ -52,8 +52,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _Py_NO_ADDRESS_SAFETY_ANALYSIS
|
#ifndef _Py_NO_SANITIZE_ADDRESS
|
||||||
# define _Py_NO_ADDRESS_SAFETY_ANALYSIS
|
# define _Py_NO_SANITIZE_ADDRESS
|
||||||
#endif
|
#endif
|
||||||
#ifndef _Py_NO_SANITIZE_THREAD
|
#ifndef _Py_NO_SANITIZE_THREAD
|
||||||
# define _Py_NO_SANITIZE_THREAD
|
# define _Py_NO_SANITIZE_THREAD
|
||||||
|
@ -1407,7 +1407,7 @@ obmalloc controls. Since this test is needed at every entry point, it's
|
||||||
extremely desirable that it be this fast.
|
extremely desirable that it be this fast.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static bool _Py_NO_ADDRESS_SAFETY_ANALYSIS
|
static bool _Py_NO_SANITIZE_ADDRESS
|
||||||
_Py_NO_SANITIZE_THREAD
|
_Py_NO_SANITIZE_THREAD
|
||||||
_Py_NO_SANITIZE_MEMORY
|
_Py_NO_SANITIZE_MEMORY
|
||||||
address_in_range(void *p, poolp pool)
|
address_in_range(void *p, poolp pool)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue