CodeIntelligenceTesting / jazzer

Coverage-guided, in-process fuzzing for the JVM
https://code-intelligence.com
Other
1.03k stars 137 forks source link

jazzer.instrument=com.tejasoft.edu.oom.tests.TestOOMAnalyzer #762

Open nagkumar opened 1 year ago

nagkumar commented 1 year ago

jazzer.instrument property not supporting reg-ex such as

jazzer.instrument=com.tejasoft.*.oom.tests.TestOOMAnalyzer

jazzer.instrument=com.tejasoft.**.TestOOMAnalyzer

jazzer.instrument=*.TestOOM

only FQN is supported such as

jazzer.instrument=com.tejasoft.edu.oom.tests.TestOOMAnalyzer or jazzer.instrument=com.tejasoft.edu.oom.tests.TestOOM*

error it gives are

jazzer.instrument=com.tejasoft.edu.oom.tests.TestOOMAnalyze

image image image
fmeum commented 1 year ago

This is unfortunately pretty tricky to resolve: Supporting regexes instead of this more limited form of glob patterns would require the instrumentation logic to use java.util.regex, which in turn means that we may run into weird circularity issues when trying to fuzz or instrument this package (which we do to track progress through regex matches).

While it's possible that this would now be simpler to do than when this workaround was introduced, it's also rather unusual to instrument all classes with a certain naming pattern, but across packages. Do you have a real use case for this? If you only instrument a test class, then the fuzzer will not have visibility into your actual production code.

ghost commented 8 months ago

@nagkumar - did you figure out a workaround or abandon the project? A lot has changed on our side since you opened this issue in June. Ping me to discuss? david[dot]merian [at] code-intelligence[dot]com