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 @@ -629,14 +629,18 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
629
629
let Ok ( offset) = u64:: try_from ( offset) else {
630
630
let einval = this. eval_libc ( "EINVAL" ) ;
631
631
this. set_last_error ( einval) ?;
632
- return Ok ( Scalar :: from_target_isize ( -1 , this) ) ;
632
+ let res = Scalar :: from_target_isize ( -1 , this) ;
633
+ this. write_scalar ( res, dest) ?;
634
+ return Ok ( ( ) ) ;
633
635
} ;
634
636
fd. pwrite ( communicate, & bytes, offset, this)
635
637
}
636
638
} ;
637
639
638
- let result = result?. map ( |c| i64:: try_from ( c) . unwrap ( ) ) ;
639
- Ok ( Scalar :: from_target_isize ( this. try_unwrap_io_result ( result) ?, this) )
640
+ let result = this. try_unwrap_io_result ( result?. map ( |c| i64:: try_from ( c) . unwrap ( ) ) ) ?;
641
+ this. write_scalar ( Scalar :: from_target_isize ( result, this) , dest) ?;
642
+ Ok ( ( ) )
643
+ //Ok(Scalar::from_target_isize(this.try_unwrap_io_result(result)?, this))
640
644
}
641
645
642
646
/// 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