diff --git a/tests/libfuzzer/dav1d_fuzzer.c b/tests/libfuzzer/dav1d_fuzzer.c index 18d012bf..d4d3323c 100644 --- a/tests/libfuzzer/dav1d_fuzzer.c +++ b/tests/libfuzzer/dav1d_fuzzer.c @@ -31,6 +31,7 @@ #include #include +#include "src/cpu.h" #include "dav1d_fuzzer.h" static unsigned r32le(const uint8_t *const p) { @@ -62,6 +63,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) dav1d_version(); + // memory sanitizer is inherently incompatible with asm +#if defined(__has_feature) + #if __has_feature(memory_sanitizer) + dav1d_set_cpu_flags_mask(0); + #endif +#endif + if (size < 32) goto end; ptr += 32; // skip ivf header