From: TERESH1 Date: Wed, 28 Dec 2022 22:03:20 +0000 (+0300) Subject: add "no sanitize undefined" attribute with clang (#1827) X-Git-Tag: v3.7.0~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e47e56c9d629d26dee7d949836e2b87dc219351;p=thirdparty%2Flibarchive.git add "no sanitize undefined" attribute with clang (#1827) Issue #1826 --- diff --git a/libarchive/xxhash.c b/libarchive/xxhash.c index f96e9d934..beacd2391 100644 --- a/libarchive/xxhash.c +++ b/libarchive/xxhash.c @@ -149,6 +149,10 @@ typedef struct _U32_S { U32 v; } _PACKED U32_S; #if GCC_VERSION >= 409 __attribute__((__no_sanitize_undefined__)) +#else +# if defined(__clang__) +__attribute__((no_sanitize("undefined"))) +# endif #endif #if defined(_MSC_VER) static __inline U32 A32(const void * x)