From 2c20c7c859f3e3dc229b2409a2df6e21b90bd370 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 20 Jun 2023 19:00:23 +0200 Subject: [PATCH] removed UB --- hbvm/src/vm/mem/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbvm/src/vm/mem/mod.rs b/hbvm/src/vm/mem/mod.rs index 9e75261..476f835 100644 --- a/hbvm/src/vm/mem/mod.rs +++ b/hbvm/src/vm/mem/mod.rs @@ -30,7 +30,7 @@ impl Memory { let mut entry = PtEntry::new( { let layout = alloc::alloc::Layout::from_size_align_unchecked(4096, 4096); - let ptr = alloc::alloc::alloc(layout); + let ptr = alloc::alloc::alloc_zeroed(layout); if ptr.is_null() { alloc::alloc::handle_alloc_error(layout); }