File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -573,8 +573,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
573
573
// We temporarily dup the FD to be able to retain mutable access to `this`.
574
574
let Some ( fd) = this. machine . fds . get ( fd_num) else {
575
575
trace ! ( "read: FD not found" ) ;
576
- let res = Scalar :: from_target_isize ( this. fd_not_found ( ) ?, this ) ;
577
- this. write_scalar ( res, dest) ?;
576
+ let res: i32 = this. fd_not_found ( ) ?;
577
+ this. write_int ( res, dest) ?;
578
578
return Ok ( ( ) ) ;
579
579
} ;
580
580
@@ -626,6 +626,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
626
626
let Some ( fd) = this. machine . fds . get ( fd_num) else {
627
627
let res = this. fd_not_found ( ) ?;
628
628
this. write_scalar ( Scalar :: from_target_isize ( res, this) , dest) ?;
629
+ let Some ( fd) = this. machine . fds . get ( fd_num) else {
630
+ let res: i32 = this. fd_not_found ( ) ?;
631
+ this. write_int ( res, dest) ?;
629
632
return Ok ( ( ) ) ;
630
633
} ;
631
634
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ impl FileDescription for Event {
71
71
let Some ( bytes) = bytes. first_chunk_mut :: < U64_ARRAY_SIZE > ( ) else {
72
72
let result = Ok ( Err ( Error :: from ( ErrorKind :: InvalidInput ) ) ) ;
73
73
ecx. read_byte_helper ( ptr, bytes. to_vec ( ) , result, dest) ?;
74
- // TODO: remove the usize later
75
74
return Ok ( ( ) ) ;
76
75
} ;
77
76
// Block when counter == 0.
You can’t perform that action at this time.
0 commit comments