Skip to content

Commit

Permalink
pythongh-112536: Define MI_TSAN to 1 for --with-mimalloc and --with-t…
Browse files Browse the repository at this point in the history
…hread-sanitizer
  • Loading branch information
corona10 committed Mar 10, 2024
1 parent 5b2f21f commit a97883f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4750,6 +4750,12 @@ elif test "$disable_gil" = "yes"; then
AC_MSG_ERROR([--disable-gil requires mimalloc memory allocator (--with-mimalloc).])
fi

if test "$with_mimalloc" = yes; then
if test "$with_tsan" = yes; then
AC_DEFINE([MI_TSAN], [1], [Define MI_TSAN for thread sanitizer])
fi
fi

AC_MSG_RESULT([$with_mimalloc])
AC_SUBST([WITH_MIMALLOC])
AC_SUBST([MIMALLOC_HEADERS])
Expand Down
3 changes: 3 additions & 0 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,9 @@
<sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS

/* Define MI_TSAN for thread sanitizer */
#undef MI_TSAN

/* Define if mvwdelch in curses.h is an expression. */
#undef MVWDELCH_IS_EXPRESSION

Expand Down

0 comments on commit a97883f

Please sign in to comment.