diff --git a/sdk/src/common/system.rs b/sdk/src/common/system.rs index 96b06eae3..9f9b9e2b8 100644 --- a/sdk/src/common/system.rs +++ b/sdk/src/common/system.rs @@ -144,7 +144,10 @@ fn populate_event_tape(self_prog_id: ProgramIdentifier) -> EventTapeType { event_tape_read(&mut len_bytes); let len: usize = u32::from_le_bytes(len_bytes).try_into().unwrap(); - let buf: &'static mut Vec = Box::leak(Box::new(vec![0; len])); + let buf: &'static mut AlignedVec = Box::leak(Box::new(AlignedVec::with_capacity(len))); + unsafe { + buf.set_len(len); + } event_tape_read(buf); let canonical_ordered_temporal_hints =