From 9f57fdad5c59f0352d1a5a5909ad690c967d8820 Mon Sep 17 00:00:00 2001 From: animetosho Date: Mon, 4 Sep 2023 21:09:33 +1000 Subject: [PATCH] Suppress ASAN warning --- parpar/gf16/gf16_checksum_x86.h | 6 +++++- parpar/gf16/gf16_muladd_multi.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/parpar/gf16/gf16_checksum_x86.h b/parpar/gf16/gf16_checksum_x86.h index 3714435..b953532 100644 --- a/parpar/gf16/gf16_checksum_x86.h +++ b/parpar/gf16/gf16_checksum_x86.h @@ -66,7 +66,11 @@ ALIGN_TO(64, static char load_mask[64]) = { #endif // load part of a vector, zeroing out remaining bytes -static inline _mword partial_load(const void* ptr, size_t bytes) { +static inline _mword partial_load(const void* ptr, size_t bytes) +#if HEDLEY_HAS_ATTRIBUTE(no_sanitize) + __attribute__((no_sanitize("address"))) // suppress 'heap-buffer-overflow' due to possibly reading past the end of the buffer; as it's an aligned load, it'll never actually cause a fault +#endif +{ #if MWORD_SIZE == 64 // AVX512 is easy - masked load does the trick return _mm512_maskz_loadu_epi8((1ULL<