summaryrefslogtreecommitdiff
path: root/Include/Python.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 6177bad869..565f34a371 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -53,6 +53,15 @@
#include "pyport.h"
#include "pymacro.h"
+/* A convenient way for code to know if clang's memory sanitizer is enabled. */
+#if defined(__has_feature)
+# if __has_feature(memory_sanitizer)
+# if !defined(MEMORY_SANITIZER)
+# define MEMORY_SANITIZER
+# endif
+# endif
+#endif
+
#include "pyatomic.h"
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.