ossf / fuzz-introspector

Fuzz Introspector -- introspect, extend and optimise fuzzers
https://fuzz-introspector.readthedocs.io
Apache License 2.0
368 stars 54 forks source link

jvm issues #629

Closed DavidKorczynski closed 1 year ago

DavidKorczynski commented 1 year ago

Umbrella issue for minor jvm issues

DavidKorczynski commented 1 year ago

Example wrong url: http://localhost:8008/covreport/linux/org/apache/commons/cli/DefaultParser.html#L530

Right link: http://localhost:8008/covreport/linux/org.apache.commons.cli/DefaultParser.java.html#L530

arthurscchan commented 1 year ago

This issue is a on-going bug fixing issue for Issue #536.

arthurscchan commented 1 year ago

Example wrong url: http://localhost:8008/covreport/linux/org/apache/commons/cli/DefaultParser.html#L530

Right link: http://localhost:8008/covreport/linux/org.apache.commons.cli/DefaultParser.java.html#L530

The possible reason is Jacoco report does not care non-instruction statements, will need to check if there is option in the jacoco report to allow inspection of those statements and fix it on oss-fuzz side.

No option found, decided to use manual patch to add line number manually to those non-instruction line in PR #633. PR #633 has execute the patching logic before the report has been copied to the designated location. PR#635 aims to fix this problem by moving the code to runner.py and patch those html source report after it has been moved to the covreport expected directory.

arthurscchan commented 1 year ago

Another possible issue is the difference in runtime coverage and static reachability analysis. Some methods are missing in the reachability analysis making runtime coverage not able to handle those methods correctly.

arthurscchan commented 1 year ago

Additional figures that are needed to modify is the method reached for each fuzzers, instead of just counting the first layer of reachable methods, count deep into all layer of method reached and add them and show a total sum of all reachable methods from the whole call tree.

arthurscchan commented 1 year ago

PR #632 and #634 aims to handle the link resolve bugs happened for linking the callgraph functions to the jacoco source report. It includes the missing of .java for code handling, mishandled link for package folder and mishandled link for the source code reference of subclasses.

arthurscchan commented 1 year ago

Further unit testing are being monitored in Issue #630