Skip to content

Commit 2f80abc

Browse files
committed
Define MI_TRACK_ASAN for GIL builds
1 parent ea41e82 commit 2f80abc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎Include/internal/pycore_mimalloc.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ struct mi_heap_qsbr_s {
5959
# define MI_TSAN 1
6060
#endif
6161

62+
// Used to disable warnings on failed ASAN allocations, Not disabled on
63+
// free-threaded builds because they safely read memory after free
64+
#if defined(_Py_ADDRESS_SANITIZER) && !Py_GIL_DISABLED
65+
# define MI_TRACK_ASAN 1
66+
#endif
67+
6268
#ifdef __cplusplus
6369
extern "C++" {
6470
#endif

0 commit comments

Comments
 (0)