File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -628,14 +628,18 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
628
628
let Ok ( offset) = u64:: try_from ( offset) else {
629
629
let einval = this. eval_libc ( "EINVAL" ) ;
630
630
this. set_last_error ( einval) ?;
631
- return Ok ( Scalar :: from_target_isize ( -1 , this) ) ;
631
+ let res = Scalar :: from_target_isize ( -1 , this) ;
632
+ this. write_scalar ( res, dest) ?;
633
+ return Ok ( ( ) ) ;
632
634
} ;
633
635
fd. pwrite ( communicate, & bytes, offset, this)
634
636
}
635
637
} ;
636
638
637
- let result = result?. map ( |c| i64:: try_from ( c) . unwrap ( ) ) ;
638
- Ok ( Scalar :: from_target_isize ( this. try_unwrap_io_result ( result) ?, this) )
639
+ let result = this. try_unwrap_io_result ( result?. map ( |c| i64:: try_from ( c) . unwrap ( ) ) ) ?;
640
+ this. write_scalar ( Scalar :: from_target_isize ( result, this) , dest) ?;
641
+ Ok ( ( ) )
642
+ //Ok(Scalar::from_target_isize(this.try_unwrap_io_result(result)?, this))
639
643
}
640
644
641
645
/// This function write bytes to the user supplied buffer and write the total number of bytes
You can’t perform that action at this time.
0 commit comments