[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] oss-fuzz: Fix coverage runtime error


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • Date: Wed, 28 Aug 2024 09:38:23 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=tklengyel.com; spf=pass smtp.mailfrom=tamas@xxxxxxxxxxxxx; dmarc=pass header.from=<tamas@xxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724852308; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=h5izV+gy9kms6C1QElYdVAc20fiMd6pHKbrRU4zUrIk=; b=OgnanZK7kHoGZsnfXU4pTOM0a319/1V3uF5oQFyN/QH0o4462c/9XCoj9Pk5Io27uryFMI83AnB8Jn5DQ5NKrImaFo+a1uexUMfQ/RcD1wzXZ2y7CS83zJTu/kZtTgC6bx91JablKOHhZueERMaon5tDGM40ZOTjjksNlWwYSiQ=
  • Arc-seal: i=1; a=rsa-sha256; t=1724852308; cv=none; d=zohomail.com; s=zohoarc; b=Z3AhUZM4obUdwIZun6TURgGCxhMh5jKOkglTsl1EJg72at/VDGChmLJjc0c+baH/3w/aXYEEuuAQm2Nw5BjqbDshbaevnc6CRAqAje7t5JYg7YEVb31Tdyv7E1sSUtcgaQVxRfS+dL783Prk5tLA4ehfUlDf5w1OnoPvbEiS5Kw=
  • Cc: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivered-to: tamas@xxxxxxxxxxxxx
  • Delivery-date: Wed, 28 Aug 2024 13:38:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxx>
---
 tools/fuzz/oss-fuzz/build.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/fuzz/oss-fuzz/build.sh b/tools/fuzz/oss-fuzz/build.sh
index 08eeb66e4c..002d86c44f 100644
--- a/tools/fuzz/oss-fuzz/build.sh
+++ b/tools/fuzz/oss-fuzz/build.sh
@@ -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
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.