ref: bc803f00fd8c4cf4c5f882583c542d7d4c5e112d
parent: f8e918a9f15c2971ab01b7cb511bb5f808c2b479
author: Janne Grunau <janne-vlc@jannau.net>
date: Tue Oct 23 14:58:25 EDT 2018
fuzzer: add a multithreaded fuzzer using 2 frame and tile threads
--- a/tests/libfuzzer/dav1d_fuzzer.c
+++ b/tests/libfuzzer/dav1d_fuzzer.c
@@ -53,6 +53,12 @@
dav1d_default_settings(&settings);
+#ifdef DAV1D_MT_FUZZING
+ settings.n_frame_threads = settings.n_tile_threads = 2;
+#else
+ settings.n_frame_threads = settings.n_tile_threads = 1;
+#endif
+
err = dav1d_open(&ctx, &settings);
if (err < 0) goto end;
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -103,3 +103,14 @@
build_by_default: true,
dependencies : [thread_dependency],
)
+
+dav1d_fuzzer_mt = executable('dav1d_fuzzer_mt',
+ dav1d_fuzzer_sources,
+ include_directories: dav1d_inc_dirs,
+ c_args: [stackalign_flag, stackrealign_flag] + fuzzer_flags +
+ ['-DDAV1D_MT_FUZZING'],
+ link_args: fuzzer_flags,
+ link_with : libdav1d,
+ build_by_default: true,
+ dependencies : [thread_dependency],
+ )