-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
When running a fuzzer as an executable, it looks like the corpus generated by the fuzz engine is not saved.
Steps taken to encounter this issue:
Say we have built a binary called fuzz.test. The fuzz harness is called Fuzz.
I run it with ./fuzz.test -test.fuzz=Fuzz.
I get the message:
testing: -test.fuzzcachedir must be set if -test.fuzz is set
...
So I specify the cache dir and run it again:
mkdir /tmp/cachedir
./fuzz.test -test.fuzz=Fuzz -test.fuzzcachedir=/tmp/cachedir...and after a few minutes I check the contents of the specified cachedir. There are no files.
I then run the fuzzer without building an executable first, and specify the cachedir and check the contents of that cachedir after a few seconds. This time, the corpus is available in /tmp/cachedir/Fuzz. And if I don't specify the cachedir, the corpus files are available in the go-build cachedir.
Is there currently no way to save the corpus when running the fuzzer as an executable?