From c23ab6fa247b3ca4d0a299ca1c8cda32ca441420 Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Sun, 20 Oct 2024 15:19:54 +0200 Subject: [PATCH] Add `reset` to the fuzz target --- fuzz/fuzz_targets/allocate_deallocate.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fuzz/fuzz_targets/allocate_deallocate.rs b/fuzz/fuzz_targets/allocate_deallocate.rs index a5eea4d..f4740c3 100644 --- a/fuzz/fuzz_targets/allocate_deallocate.rs +++ b/fuzz/fuzz_targets/allocate_deallocate.rs @@ -14,6 +14,7 @@ struct Input { enum AllocatorMethod { Allocate, Deallocate { index: usize }, + Reset, } fuzz_target!(|input: Input| { @@ -35,6 +36,10 @@ fuzz_target!(|input: Input| { ptrs[index] = None; } } + AllocatorMethod::Reset => { + unsafe { allocator.reset() }; + ptrs.clear(); + } } }