Skip to content

Commit 3d32fb2

Browse files
authored
Revert "save trace of the found bug (#533)" (#534)
This reverts commit 6b1c2d8.
1 parent 6b1c2d8 commit 3d32fb2

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/evm/cov_stage.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,15 @@ where
167167
.deref()
168168
.borrow_mut()
169169
.save_trace(format!("{}/{}", self.trace_dir, i).as_str());
170-
170+
if let Some(bug_idx) = meta.corpus_idx_to_bug.get(&i.into()) {
171+
for id in bug_idx {
172+
fs::copy(
173+
format!("{}/{}.json", self.trace_dir, i),
174+
format!("{}/bug_{}.json", self.trace_dir, id),
175+
)
176+
.unwrap();
177+
}
178+
}
171179
unsafe {
172180
EVAL_COVERAGE = false;
173181
}

src/fuzzer.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ where
380380
+ HasExecutionResult<Loc, Addr, VS, Out, CI>
381381
+ HasExecutions
382382
+ HasMetadata
383-
+ HasCurrentInputIdx
384383
+ HasRand
385384
+ HasLastReportTime
386385
+ UsesInput<Input = I>,
@@ -579,18 +578,6 @@ where
579578

580579
solution::generate_test(cur_report.clone(), minimized);
581580

582-
unsafe {
583-
for bug_idx in ORACLE_OUTPUT.iter().map(|v| v["bug_idx"].as_u64().unwrap()) {
584-
let src = format!("{}/traces/{}.json", self.work_dir, &state.get_current_input_idx());
585-
let dest = format!("{}/traces/bug_{}.json", self.work_dir, bug_idx);
586-
if std::fs::metadata(&src).is_ok() {
587-
std::fs::copy(&src, &dest).unwrap();
588-
} else {
589-
eprintln!("Source trace {} does not exist", src);
590-
}
591-
}
592-
}
593-
594581
let vuln_file = format!("{}/vuln_info.jsonl", self.work_dir.as_str());
595582
let mut f = OpenOptions::new()
596583
.create(true)

0 commit comments

Comments
 (0)