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 {
58
58
#[ rustfmt:: skip]
59
59
impl ArchIndependentRegs for libc:: user_regs_struct {
60
60
#[ inline]
61
- fn ip ( & self ) -> usize { self . eip . try_into ( ) . unwrap ( ) }
61
+ fn ip ( & self ) -> usize { self . eip . cast_unsigned ( ) . try_into ( ) . unwrap ( ) }
62
62
#[ 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 ( ) }
64
64
#[ 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 ( ) }
66
66
}
67
67
68
68
/// A unified event representing something happening on the child process. Wraps
@@ -493,7 +493,7 @@ fn handle_segfault(
493
493
ptrace:: write (
494
494
pid,
495
495
( & 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 ( ) ,
497
497
)
498
498
. unwrap ( ) ;
499
499
You can’t perform that action at this time.
0 commit comments