Skip to content

Commit 7f79893

Browse files
committed
Add examples of passing options to Jazzer and libFuzzer
1 parent 9940ae8 commit 7f79893

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

BUILD

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,22 @@ java_test_suite(
1919
env = {
2020
# Also use the generated corpus directory when regression testing.
2121
"JAZZER_COVERAGE": "1",
22+
# Continue fuzzing until 10 unique (deduplicated) crashes are found.
23+
# Same as "-Djazzer.keep_going=10" jvm_flag below
24+
# "JAZZER_KEEP_GOING": "10",
2225
},
26+
jvm_flags = [
27+
"-Djazzer.keep_going=10", # Continue fuzzing until 10 unique (deduplicated) crashes are found.
28+
# "-Djazzer.internal.basedir=$${PWD}", # In case we want to change Jazzer's basedir
29+
30+
# Arguments to libFuzzer (active only in fuzzing mode). Have to be numbered starting from 0.
31+
"-Djazzer.internal.arg.0=ignored", # Placeholder for the target class name. Must be present. Value is ignored.
32+
"-Djazzer.internal.arg.1=-print_final_stats=1", # Prints libFuzzer stats when the process is terminated.
33+
# "-Djazzer.internal.arg.2=-help=1", # Prints all arguments supported by libFuzzer and exits.
34+
35+
# Disable regex sanitizers during fuzzing and regression.
36+
"-Djazzer.disabled_hooks=com.code_intelligence.jazzer.sanitizers.RegexRoadblocks:com.code_intelligence.jazzer.sanitizers.RegexInjection",
37+
],
2338
# Resources to be bundled into the test Jar. Only used when regression testing with Jazzer.
2439
resources = glob(
2540
[

0 commit comments

Comments
 (0)