Skip to content

Commit

Permalink
scripts/oss-fuzz: rename bin/qemu-fuzz-i386
Browse files Browse the repository at this point in the history
OSS-Fuzz changed the way it scans for fuzzers in $DEST_DIR. The new code
also scans subdirectories for fuzzers. This means that OSS-Fuzz is
considering bin/qemu-fuzz-i386 as an independent fuzzer (it is not - it
requires a --fuzz-target argument). This has led to coverage-build
failures and false crash reports. To work around this, we take advantage
of OSS-Fuzz' filename extension check - OSS-Fuzz will not run anything
that has an extension that is not ".exe":
https://github.com/google/oss-fuzz/blob/master/infra/utils.py#L115

Reported-by: OSS-Fuzz (Issue 26725)
Reported-by: OSS-Fuzz (Issue 26679)
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201101212245.185819-1-alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
a1xndr authored and bonzini committed Nov 3, 2020
1 parent 3792185 commit f8b8f37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/oss-fuzz/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ make "-j$(nproc)" qemu-fuzz-i386 V=1
# Copy over the datadir
cp -r ../pc-bios/ "$DEST_DIR/pc-bios"

cp "./qemu-fuzz-i386" "$DEST_DIR/bin/"
cp "./qemu-fuzz-i386" "$DEST_DIR/bin/qemu-fuzz-i386.base"

# Run the fuzzer with no arguments, to print the help-string and get the list
# of available fuzz-targets. Copy over the qemu-fuzz-i386, naming it according
Expand All @@ -104,7 +104,7 @@ do
# that are thin wrappers around this target that set the required
# environment variables according to predefined configs.
if [ "$target" != "generic-fuzz" ]; then
ln "$DEST_DIR/bin/qemu-fuzz-i386" \
ln "$DEST_DIR/bin/qemu-fuzz-i386.base" \
"$DEST_DIR/qemu-fuzz-i386-target-$target"
fi
done
Expand Down

0 comments on commit f8b8f37

Please sign in to comment.