From: W. Felix Handte Date: Fri, 13 Jan 2023 16:51:59 +0000 (-0500) Subject: Disable Custom ASAN/MSAN Poisoning on MinGW Builds X-Git-Tag: v1.5.4^2~52^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f10922a8fa84d332a4d001bc2a1f659a00ae0213;p=thirdparty%2Fzstd.git Disable Custom ASAN/MSAN Poisoning on MinGW Builds Addresses #3240. --- diff --git a/lib/common/compiler.h b/lib/common/compiler.h index e423f2467..4ad55e601 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -281,6 +281,17 @@ * 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