aboutsummaryrefslogtreecommitdiff
path: root/include/libyuv/planar_functions.h
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2023-08-31 10:17:12 -0700
committerlibyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-08-31 18:07:42 +0000
commitf0921806a293e3e008e6325a51d4ea760c39d2c1 (patch)
tree2f47149d6db45e4503553aaf9e95b560211df7a7 /include/libyuv/planar_functions.h
parent6ff369102723dea853b1642649f991d0ca7b292b (diff)
downloadlibyuv-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/planar_functions.h')
-rw-r--r--include/libyuv/planar_functions.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/libyuv/planar_functions.h b/include/libyuv/planar_functions.h
index 8256fcaa..f9344721 100644
--- a/include/libyuv/planar_functions.h
+++ b/include/libyuv/planar_functions.h
@@ -30,7 +30,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