-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-112536: Define MI_TSAN to 1 for --with-mimalloc and --with-thread-sanitizer #116558
Conversation
Suggested from: #112648 (comment) |
configure.ac
Outdated
@@ -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 mimalloc thread sanitizer support]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do this in pycore_mimalloc.h
instead. We already do that for MI_DEBUG
and some other defines.
Something like:
#ifdef _Py_THREAD_SANITIZER
# define MI_TSAN 1
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, yes that looks like a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
…sanitizer
--with-thread-sanitizer
#112536