diff options
author | Frank Barchard <fbarchard@google.com> | 2023-08-31 10:17:12 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-08-31 18:07:42 +0000 |
commit | f0921806a293e3e008e6325a51d4ea760c39d2c1 (patch) | |
tree | 2f47149d6db45e4503553aaf9e95b560211df7a7 /include/libyuv/scale_row.h | |
parent | 6ff369102723dea853b1642649f991d0ca7b292b (diff) | |
download | libyuv-f0921806a293e3e008e6325a51d4ea760c39d2c1.tar.gz |
Disable NEON if memory sanitizer is enabled
- MSAN fails on most inline assembly, unaware of what the load and store instructions do.
- MSAN is also failing on row_any functions, which memcpy a correct number of pixels into a buffer that is SIMD vector sized, apply SIMD to the full vector, and then memcpy the exact number of resulting pixels to the output buffer. MSAN wants the temporary buffer to be initialized. Which genenerally is done with a memset(buf, 0, sizeof(buf)); to satisify MSAN.
- RVV may not require disabling MSAN, since row functions are all 'any' number of elements, and implementation is intrinsics.
Bug: b/297979878
Change-Id: Ic21200689c0c7d2c85bb1de3eef38570137d3d8b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4832740
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Diffstat (limited to 'include/libyuv/scale_row.h')
-rw-r--r-- | include/libyuv/scale_row.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h index fd136ab7..c015d772 100644 --- a/include/libyuv/scale_row.h +++ b/include/libyuv/scale_row.h @@ -29,7 +29,10 @@ extern "C" { #endif // MemorySanitizer does not support assembly code yet. http://crbug.com/344505 #if defined(__has_feature) -#if __has_feature(memory_sanitizer) +#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_NEON) +#define LIBYUV_DISABLE_NEON +#endif +#if __has_feature(memory_sanitizer) && !defined(LIBYUV_DISABLE_X86) #define LIBYUV_DISABLE_X86 #endif #endif |