]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
add "no sanitize undefined" attribute with clang (#1827)
authorTERESH1 <svyatoslavtereshin@yandex.ru>
Wed, 28 Dec 2022 22:03:20 +0000 (01:03 +0300)
committerGitHub <noreply@github.com>
Wed, 28 Dec 2022 22:03:20 +0000 (23:03 +0100)
Issue #1826

libarchive/xxhash.c

index f96e9d93493ee21ec6ce3024d92e7d9e764dc6fb..beacd2391221d3e0f36e28ed886760e702704c08 100644 (file)
@@ -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)