fuzz-introspector icon indicating copy to clipboard operation
fuzz-introspector copied to clipboard

JVM projects fail during introspector build due to incorrect $SRC path and coverage data is duplicated across multiple fuzzers

Open leofernandesmo opened this issue 4 months ago • 1 comments

I've encountered two issues when running the introspector on JVM projects in OSS-Fuzz:

Issue 1: Build Failure Due to Incorrect $SRC Path When executing (example) python infra/helper.py introspector apache-commons-jxpath, the build process fails with the following error:

++ basename -s .java /src/inspector/light/source_files/src/JXPathContextFuzzer.java
+ fuzzer_basename=JXPathContextFuzzer
+ javac -cp /out/commons-jxpath.jar::/usr/local/lib/jazzer_api_deploy.jar /src/inspector/light/source_files/src/JXPathContextFuzzer.java
+ cp /src/JXPathContextFuzzer.class /out/
cp: cannot stat '/src/JXPathContextFuzzer.class': No such file or directory
ERROR:__main__:Building fuzzers failed.

Root Cause analysis:

  • The introspector modifies the $SRC variable to point to /src/inspector/light/source_files/src/
  • However, the compiled .class files are being copied from the original $SRC path.
  • This creates a mismatch where the build script looks for .class files in the wrong location

Issue 2: Duplicate Coverage Data Across Multiple Fuzzers When a project contains multiple fuzzers (2+), the introspector web interface displays identical coverage data for all fuzzers, rather than showing the individual coverage achieved by each fuzzer.

Expected Behavior: Each fuzzer should show its unique coverage data Actual Behavior: All fuzzers display the same coverage metrics

Environment OSS-Fuzz version: Latest (as of December 2024) Project type: JVM projects Test project: apache-commons-jxpath, metadata-extractor Container: gcr.io/oss-fuzz-base/base-builder-jvm

leofernandesmo avatar Aug 14 '25 09:08 leofernandesmo