]> xenbits.xensource.com Git - xen.git/commitdiff
oss-fuzz: Fix coverage runtime error
authorTamas K Lengyel <tamas@tklengyel.com>
Wed, 28 Aug 2024 13:38:23 +0000 (09:38 -0400)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Aug 2024 18:43:32 +0000 (19:43 +0100)
The oss-fuzz infrastructure collects runtime coverage information for debugging
and fuzzing evaluation. Currently it appears broken due to missing C files.
This is because the fuzzer's Makefile only symlinks the C files from various
locations in the Xen source tree into the build folder. These symlinks however
are gone as oss-fuzz uses separate docker containers for the build and for the
run.

Update the oss-fuzz build script to copy the required C files into the
build folder to fix this oss-fuzz specific issue.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/fuzz/oss-fuzz/build.sh

index 08eeb66e4c27403197a146cd2b1be97d2778019f..002d86c44f866eee83987ae25e17dc075aea8ad5 100644 (file)
@@ -9,3 +9,7 @@ cd xen
 make clang=y -C tools/include
 make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness
 cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator
+
+# Runtime coverage collection requires access to source files and symlinks don't work
+cp xen/lib/x86/*.c tools/fuzz/x86_instruction_emulator
+cp tools/tests/x86_emulator/*.c tools/fuzz/x86_instruction_emulator