diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-12-27 03:10:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 03:10:52 (GMT) |
commit | 5dd1909680a5be76397b19bc235a8205b79787c7 (patch) | |
tree | 7a1462c21e8f09630a2fbc99ad4778a29eabcafb /Objects | |
parent | b9b92d34646d6a1fca120f98476912f5e4ca7f34 (diff) | |
download | cpython-5dd1909680a5be76397b19bc235a8205b79787c7.zip cpython-5dd1909680a5be76397b19bc235a8205b79787c7.tar.gz cpython-5dd1909680a5be76397b19bc235a8205b79787c7.tar.bz2 |
closes bpo-30364: Replace deprecated no_address_safety_analysis attribute. (GH-17702)
(cherry picked from commit c0052f3fe3d19820b2d4f76e383035439affe32c)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/obmalloc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index bd6480a..c483ff3 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -31,8 +31,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain); #if defined(__has_feature) /* Clang */ # if __has_feature(address_sanitizer) /* is ASAN enabled? */ -# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \ - __attribute__((no_address_safety_analysis)) +# define _Py_NO_SANITIZE_ADDRESS \ + __attribute__((no_sanitize("address"))) # endif # if __has_feature(thread_sanitizer) /* is TSAN enabled? */ # define _Py_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) @@ -42,8 +42,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain); # endif #elif defined(__GNUC__) # if defined(__SANITIZE_ADDRESS__) /* GCC 4.8+, is ASAN enabled? */ -# define _Py_NO_ADDRESS_SAFETY_ANALYSIS \ - __attribute__((no_address_safety_analysis)) +# define _Py_NO_SANITIZE_ADDRESS \ + __attribute__((no_sanitize_address)) # endif // TSAN is supported since GCC 5.1, but __SANITIZE_THREAD__ macro // is provided only since GCC 7. @@ -52,8 +52,8 @@ static void _PyMem_SetupDebugHooksDomain(PyMemAllocatorDomain domain); # endif #endif -#ifndef _Py_NO_ADDRESS_SAFETY_ANALYSIS -# define _Py_NO_ADDRESS_SAFETY_ANALYSIS +#ifndef _Py_NO_SANITIZE_ADDRESS +# define _Py_NO_SANITIZE_ADDRESS #endif #ifndef _Py_NO_SANITIZE_THREAD # define _Py_NO_SANITIZE_THREAD @@ -1388,7 +1388,7 @@ obmalloc controls. Since this test is needed at every entry point, it's 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_MEMORY address_in_range(void *p, poolp pool) |