Skip to content

Commit d730b03

Browse files
committed
Define MI_TRACK_ASAN for GIL builds
1 parent d72ff2a commit d730b03

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
@@ -64,6 +64,12 @@ struct mi_heap_qsbr_s {
6464
# define MI_TSAN 1
6565
#endif
6666

67+
// Used to disable warnings on failed ASAN allocations, Not disabled on
68+
// free-threaded builds because they safely read memory after free
69+
#if defined(_Py_ADDRESS_SANITIZER) && !Py_GIL_DISABLED
70+
# define MI_TRACK_ASAN 1
71+
#endif
72+
6773
#ifdef __cplusplus
6874
extern "C++" {
6975
#endif

0 commit comments

Comments
 (0)