File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/shims/native_lib/trace Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,11 @@ impl ArchIndependentRegs for libc::user_regs_struct {
5858#[ rustfmt:: skip]
5959impl ArchIndependentRegs for libc:: user_regs_struct {
6060 #[ inline]
61- fn ip ( & self ) -> usize { self . eip . try_into ( ) . unwrap ( ) }
61+ fn ip ( & self ) -> usize { self . eip . cast_unsigned ( ) . try_into ( ) . unwrap ( ) }
6262 #[ inline]
63- fn set_ip ( & mut self , ip : usize ) { self . eip = ip. try_into ( ) . unwrap ( ) }
63+ fn set_ip ( & mut self , ip : usize ) { self . eip = ip. cast_signed ( ) . try_into ( ) . unwrap ( ) }
6464 #[ inline]
65- fn set_sp ( & mut self , sp : usize ) { self . esp = sp. try_into ( ) . unwrap ( ) }
65+ fn set_sp ( & mut self , sp : usize ) { self . esp = sp. cast_signed ( ) . try_into ( ) . unwrap ( ) }
6666}
6767
6868/// A unified event representing something happening on the child process. Wraps
@@ -493,7 +493,7 @@ fn handle_segfault(
493493 ptrace:: write (
494494 pid,
495495 ( & raw const PAGE_ADDR ) . cast_mut ( ) . cast ( ) ,
496- libc:: c_long:: try_from ( page_addr) . unwrap ( ) ,
496+ libc:: c_long:: try_from ( page_addr. cast_signed ( ) ) . unwrap ( ) ,
497497 )
498498 . unwrap ( ) ;
499499
You can’t perform that action at this time.
0 commit comments