-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook is not removed when generating coverage report #878
Comments
Could you provide the steps that lead to that stack trace? How are you running fuzzing with your hook and how are you collecting coverage? |
To reproduce from jazzer examples, add the above hook function to ./jazzer --cp=examples/src/main/java --target_class=com.example.ExampleFuzzer --custom_hooks=com.example.ExampleFuzzerHooks --coverage_report=report |
@tkmikan - thanks for the feedback on this issue. Are you still using Jazzer? |
TLDR: Hooks are not removed after fuzz ends, while their classpath is removed.
Details:
I am fuzzing some code taking user input as ArrayList size e.g.
If the fuzzer provides a large int, it will take large memory and long time, so I write a hook to avoid this like:
However, with this hook, exception is raised when generating coverage report.
The cause is, my hook is effective for Pattern.java:1775
new ArrayList<>(10);
, but the classpath argument does not work here, resulting in aNoClassDefFoundError
.Stacktrace:
I haven't looked into jazzer's implementation about classloader and instrumention. Some possible fix may be use separate classloaders for fuzzing and others(not hook), or reload/restore after fuzzing.
The text was updated successfully, but these errors were encountered: