diff --git a/hbvm/fuzz/fuzz_targets/vm.rs b/hbvm/fuzz/fuzz_targets/vm.rs index 2c368db9..74784630 100644 --- a/hbvm/fuzz/fuzz_targets/vm.rs +++ b/hbvm/fuzz/fuzz_targets/vm.rs @@ -39,6 +39,8 @@ fuzz_target!(|data: &[u8]| { for (i, page) in pages.into_iter().enumerate() { unmap_and_dealloc(&mut vm.memory, page, i as u64 * 4096); } + + let _ = unsafe { Box::from_raw(vm.memory.root_pt) }; } }); diff --git a/hbvm/src/main.rs b/hbvm/src/main.rs index 7bb45022..04d654dd 100644 --- a/hbvm/src/main.rs +++ b/hbvm/src/main.rs @@ -47,12 +47,12 @@ fn main() -> Result<(), Box> { println!("Program interrupt: {:?}", vm.run()); println!("{:?}", vm.registers); - println!("{:?}", core::slice::from_raw_parts(data, 4096)); std::alloc::dealloc( data, std::alloc::Layout::from_size_align_unchecked(4096, 4096), ); vm.memory.unmap(8192).unwrap(); + let _ = Box::from_raw(vm.memory.root_pt); } } Ok(())