#else
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
+ #if __has_feature(hwaddress_sanitizer) /* is HWASAN enabled? */
+ #define ATTRIBUTE_NO_SANITIZE_HWADDRESS \
+ __attribute__((no_sanitize("hwaddress")))
+ #else
+ #define ATTRIBUTE_NO_SANITIZE_HWADDRESS
+ #endif
#else
#if defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x, is ASAN enabled? */
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
#else
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
+ #if defined(__SANITIZE_HWADDRESS__) /* is HWASAN enabled? */
+ #define ATTRIBUTE_NO_SANITIZE_HWADDRESS \
+ __attribute__((no_sanitize_hwaddress))
+ #else
+ #define ATTRIBUTE_NO_SANITIZE_HWADDRESS
+ #endif
#endif
#ifdef WITH_PYMALLOC
#undef PyObject_Free
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
+ATTRIBUTE_NO_SANITIZE_HWADDRESS
void
PyObject_Free(void *p)
{
#undef PyObject_Realloc
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
+ATTRIBUTE_NO_SANITIZE_HWADDRESS
void *
PyObject_Realloc(void *p, size_t nbytes)
{