]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Disable Custom ASAN/MSAN Poisoning on MinGW Builds
authorW. Felix Handte <w@felixhandte.com>
Fri, 13 Jan 2023 16:51:59 +0000 (11:51 -0500)
committerW. Felix Handte <w@felixhandte.com>
Fri, 13 Jan 2023 16:53:09 +0000 (11:53 -0500)
Addresses #3240.

lib/common/compiler.h

index e423f24671c3dea6a06cb403850ec0d033ece41d..4ad55e601e60a208a111b4ec748dbecd6eb4d4be 100644 (file)
 *  Sanitizer
 *****************************************************************/
 
+/* Issue #3240 reports an ASAN failure on an llvm-mingw build. Out of an
+ * abundance of caution, disable our custom poisoning on mingw. */
+#ifdef __MINGW32__
+#ifndef ZSTD_ASAN_DONT_POISON_WORKSPACE
+#define ZSTD_ASAN_DONT_POISON_WORKSPACE 1
+#endif
+#ifndef ZSTD_MSAN_DONT_POISON_WORKSPACE
+#define ZSTD_MSAN_DONT_POISON_WORKSPACE 1
+#endif
+#endif
+
 #if ZSTD_MEMORY_SANITIZER
 /* Not all platforms that support msan provide sanitizers/msan_interface.h.
  * We therefore declare the functions we need ourselves, rather than trying to