From f7aece15e2130154181e96875fbe86f1b59b526d Mon Sep 17 00:00:00 2001 From: atdt Date: Sat, 15 Dec 2018 01:23:22 -0800 Subject: [PATCH] Add comment explaining MSan false-positive workaround --- snappy.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/snappy.cc b/snappy.cc index 67e8a79..b7dcdaa 100644 --- a/snappy.cc +++ b/snappy.cc @@ -695,6 +695,8 @@ static inline void Report(const char *algorithm, size_t compressed_size, static inline uint32 ExtractLowBytes(uint32 v, int n) { DCHECK_GE(n, 0); DCHECK_LE(n, 4); + // TODO(b/121042345): Remove !defined(MEMORY_SANITIZER) once MSan + // handles _bzhi_u32() correctly. #if defined(__BMI2__) && !defined(MEMORY_SANITIZER) return _bzhi_u32(v, 8 * n); #else