Skip to content

bpo-30364: replace deprecated no_address_safety_analysis with no_sanitize_address #17702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Objects/obmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -1407,7 +1407,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)
Expand Down