Save trace of the found bug correctly #533
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes a bug when ityfuzz finds a solution but the call trace for the corresponding input is not copied in work_dir/traces directory as "bug_{}.json".
The following block in cov_stage.rs never returns any results:
https://github.com/fuzzland/ityfuzz/blob/master/src/evm/cov_stage.rs#L171-L177
This happens because
meta.corpus_idx_to_bug
is checked before the bug info is inserted into it in https://github.com/fuzzland/ityfuzz/blob/master/src/oracle.rs#L145Even if running with
--run-forever
I cannot find bug_{}.json in the traces directory.I moved this logic into src/fuzzer.rs after an oracle reports a solution so that the trace with current input id is copied to a new file.