crftng-intrprtrs/gc/fuzz/fuzz_targets/fuzz_target_1.rs

34 lines
647 B
Rust

#![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<AllocatorMethod>| {
let allocator = gc::allocator::GCAllocator::new();
for op in ops {
match op {
AllocatorMethod::Alloc => {
},
AllocatorMethod::Remove {index} => {
},
AllocatorMethod::CollectGarbage => {
}
}
}
});