From 6fc6517ccb567c2299cae58b76ec5655b62b68e2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 6 Oct 2020 16:59:40 +0200 Subject: [PATCH] LZ4: silent AddressSanitizer false positive? int8_t x = 0; <= writing 2 bytes?? --- common/lz4/lz4hc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lz4/lz4hc.c b/common/lz4/lz4hc.c index 0667a7cd9..d53fb1912 100644 --- a/common/lz4/lz4hc.c +++ b/common/lz4/lz4hc.c @@ -1015,7 +1015,10 @@ int LZ4_freeStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr) { return 0; } - +// Skip AddressSanitizer which breaks compilation strangely on +// lz4/lz4hc.c: error: writing 2 bytes into a region of size 1 [-Werror=stringop-overflow=] +// | LZ4_streamHCPtr->internal_donotuse.favorDecSpeed = 0; +ATTRIBUTE_NO_SANITIZE_ADDRESS LZ4_streamHC_t *LZ4_initStreamHC(void *buffer, size_t size) { LZ4_streamHC_t *const LZ4_streamHCPtr = (LZ4_streamHC_t *)buffer; if (buffer == NULL) return NULL;