#![no_main] use libfuzzer_sys::fuzz_target; use gc::{self, test_utils::GotDropped}; use libfuzzer_sys::arbitrary::Arbitrary; #[derive(Arbitrary, Debug)] enum AllocatorMethod { Alloc, Remove { // Free the index^th allocation we've made. index: usize }, CollectGarbage } fuzz_target!(|ops: Vec| { let allocator = gc::allocator::GCAllocator::new(); for op in ops { match op { AllocatorMethod::Alloc => { }, AllocatorMethod::Remove {index} => { }, AllocatorMethod::CollectGarbage => { } } } });