»fixed« fuzzer

This commit is contained in:
Erin 2023-11-03 09:49:42 +01:00
parent 88563b34f3
commit aed6b6d22b

View file

@ -1,7 +1,6 @@
#![no_main] #![no_main]
use { use {
hbbytecode::valider::validate,
hbvm::{ hbvm::{
mem::{ mem::{
softpaging::{ softpaging::{
@ -16,7 +15,6 @@ use {
}; };
fuzz_target!(|data: &[u8]| { fuzz_target!(|data: &[u8]| {
if validate(data).is_ok() {
let mut vm = unsafe { let mut vm = unsafe {
Vm::<_, 16384>::new( Vm::<_, 16384>::new(
SoftPagedMem::<_, true> { SoftPagedMem::<_, true> {
@ -44,7 +42,6 @@ fuzz_target!(|data: &[u8]| {
} }
let _ = unsafe { Box::from_raw(vm.memory.root_pt) }; let _ = unsafe { Box::from_raw(vm.memory.root_pt) };
}
}); });
fn alloc_and_map(memory: &mut SoftPagedMem<TestTrapHandler>, at: u64) -> *mut u8 { fn alloc_and_map(memory: &mut SoftPagedMem<TestTrapHandler>, at: u64) -> *mut u8 {