Skip to content
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

Bazel + junit Fuzz Tests #895

Open
asudhak opened this issue Feb 7, 2024 · 2 comments
Open

Bazel + junit Fuzz Tests #895

asudhak opened this issue Feb 7, 2024 · 2 comments

Comments

@asudhak
Copy link

asudhak commented Feb 7, 2024

When running Junit Fuzz Tests triggered using bazel test libfuzzer appears to look for the .cifuzz-corpus in a temp directory under /private/var/tmp/ and also places the crashes in a subdir of /private/var/tmp/ which gets purged after a run.

Is there a right way of specifying a different directory for Jazzer/Libfuzzer to use for the corpus and the reproducers ?

Follow up question - similarly, how do you pass other Jazzer flags such as --keep_going=N when using junit/bazel ?

@bertschneider
Copy link
Contributor

You can try to set jazzer.internal.basedir in junit-platform.properties to change the directory in which .cifuzz-corpus is placed. That being said, using bazel test should execute JUnit in a sandbox and clean up afterwards, shouldn't it?

Jazzer's JUnit integration does not create a dedicated reproduces, as it's quite easy to reproduce findings via JUnit IDE plugins. With those you can execute/debug only specific inputs.

Currently, there is no dedicated, nor easy, way to pass on arguments to libfuzzer through JUnit fuzz tests. Apparently this works, but is less that ideal.

@ghost
Copy link

ghost commented Feb 26, 2024

@asudhak - was the suggestion from @bertschneider helpful?
We can give you more detailed support on a call/over email and try other options for you. Just need to understand in detail what you are trying to achieves, and we can give the best options to solve.
Ping me? david[dot]merian [at] code-intelligence[dot]com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants