Skip to content

Commit

Permalink
remove AFL ref
Browse files Browse the repository at this point in the history
  • Loading branch information
venkkatesh-sekar committed May 22, 2024
1 parent 17890ea commit 92537ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions fuzz/fuzz_targets/stable_btreemap_multiple_ops_persistent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,15 @@ fuzz_target!(|ops: Vec<StableBTreeOperation>| {
// A new panic hook is registered to override the one set by libfuzzer which
// aborts by default. This is done because,
//
// The fuzzer maintains state via thread_local! store and on discovering a crash, AFL only
// The fuzzer maintains state via thread_local! store and on discovering a crash, libfuzzer only
// records the last set of operations that caused the crash. These operations are however
// useless without the existing memory state.
//
// To overcome this, every operation performed is stored in another persisted store OPS and
// are dumped to a file along with the memory on a panic. This allows us to reproduce the crash
// by replaying the operations.
//
// Note: This method only works if the code panics. To record multiple inputs for all forms of
// crash, look into AFL_PERSISTENT_RECORD. (https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/README.persistent_mode.md#6-persistent-record-and-replay)

// Note: This method only works if the code panics.
std::panic::set_hook(Box::new(move |panic_info| {
println!("{panic_info}");

Expand Down
5 changes: 2 additions & 3 deletions fuzz/fuzz_targets/stable_minheap_multiple_ops_persistent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ fuzz_target!(|ops: Vec<StableMinHeapOperation>| {
// A new panic hook is registered to override the one set by libfuzzer which
// aborts by default. This is done because,
//
// The fuzzer maintains state via thread_local! store and on discovering a crash, AFL only
// The fuzzer maintains state via thread_local! store and on discovering a crash, libfuzzer only
// records the last set of operations that caused the crash. These operations are however
// useless without the existing memory state.
//
// To overcome this, every operation performed is stored in another persisted store OPS and
// are dumped to a file along with the memory on a panic. This allows us to reproduce the crash
// by replaying the operations.
//
// Note: This method only works if the code panics. To record multiple inputs for all forms of
// crash, look into AFL_PERSISTENT_RECORD. (https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/README.persistent_mode.md#6-persistent-record-and-replay)
// Note: This method only works if the code panics.

std::panic::set_hook(Box::new(move |panic_info| {
println!("{panic_info}");
Expand Down

0 comments on commit 92537ad

Please sign in to comment.