]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
liblzma: #define crc_attr_no_sanitize_address in crc_common.h.
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 20 Oct 2023 18:53:35 +0000 (21:53 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 11 Jan 2024 12:29:38 +0000 (14:29 +0200)
src/liblzma/check/crc_common.h

index 4764eb1735a3c00077ee9feed55505a089e7b1e3..c949f7932afcf850d1a2b62f9c24daab895292ec 100644 (file)
 #endif
 
 
+// CRC CLMUL code needs this because accessing input buffers that aren't
+// aligned to the vector size will inherently trip the address sanitizer.
+#if lzma_has_attribute(__no_sanitize_address__)
+#      define crc_attr_no_sanitize_address \
+                       __attribute__((__no_sanitize_address__))
+#else
+#      define crc_attr_no_sanitize_address
+#endif
+
+
 // The inline keyword is only a suggestion to the compiler to substitute the
 // body of the function into the places where it is called. If a function
 // is large and called multiple times then compiler may choose to ignore the