File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
tests/rust_guests/simpleguest/src Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ fn recursive_stack_allocate_overflow() {
495495
496496#[ test]
497497fn read_invalid_address ( ) {
498- let sbox1: SingleUseSandbox = new_uninit ( ) . unwrap ( ) . evolve ( Noop :: default ( ) ) . unwrap ( ) ;
498+ let sbox1: SingleUseSandbox = new_uninit_rust ( ) . unwrap ( ) . evolve ( Noop :: default ( ) ) . unwrap ( ) ;
499499
500500 let res = sbox1
501501 . call_guest_function_by_name ( "MmioRead" , ReturnType :: Int , None )
Original file line number Diff line number Diff line change @@ -727,8 +727,7 @@ fn add(function_call: &FunctionCall) -> Result<Vec<u8>> {
727727// Used to test the behavior of the sandbox when reading from an invalid address.
728728// Currently, the vm will exit with an MMIO exit
729729fn mmio_read ( _: & FunctionCall ) -> Result < Vec < u8 > > {
730- let ptr: * const i32 = core:: ptr:: null ( ) ;
731- let val = unsafe { * ( ptr. add ( 5000000 ) ) } ;
730+ let val = unsafe { core:: ptr:: null :: < i32 > ( ) . add ( 0x400000 ) . read ( ) } ;
732731 Ok ( get_flatbuffer_result_from_int ( val) )
733732}
734733
You can’t perform that action at this time.
0 commit comments