1
mirror of https://code.videolan.org/videolan/dav1d synced 2024-09-27 11:50:24 +02:00

fuzzer: mask all CPU flags under memory sanitizer

This commit is contained in:
Janne Grunau 2018-11-19 20:13:02 +01:00
parent 1b536ad41b
commit b716083c7a

View File

@ -31,6 +31,7 @@
#include <string.h>
#include <dav1d/dav1d.h>
#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