Skip to content

Commit

Permalink
Add reset to the fuzz target
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0246 committed Oct 20, 2024
1 parent 257a3de commit c23ab6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fuzz/fuzz_targets/allocate_deallocate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct Input {
enum AllocatorMethod {
Allocate,
Deallocate { index: usize },
Reset,
}

fuzz_target!(|input: Input| {
Expand All @@ -35,6 +36,10 @@ fuzz_target!(|input: Input| {
ptrs[index] = None;
}
}
AllocatorMethod::Reset => {
unsafe { allocator.reset() };
ptrs.clear();
}
}
}

Expand Down

0 comments on commit c23ab6f

Please sign in to comment.