1
0
Fork 0
forked from koniifer/ableos

fixing stack to what compiler assumes

This commit is contained in:
mlokr 2024-05-16 16:54:12 +02:00
parent aae217dd00
commit 8cb9f2eaac

View file

@ -52,7 +52,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
eprintln!("[I] Image loaded at {:p}", mmap.as_ptr());
let mut vm = unsafe { Vm::<_, 0>::new(mem::HostMemory, Address::new(mmap.as_ptr() as u64)) };
let mut vm = unsafe {
Vm::<_, 0>::new(
mem::HostMemory,
Address::new(mmap.as_ptr().add(stack.len()) as u64),
)
};
vm.write_reg(254, stack.as_mut_ptr() as u64);
// Execute program