@@ -22,6 +22,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
2222 fn read < ' tcx > (
2323 & mut self ,
2424 _communicate_allowed : bool ,
25+ _fd_ref : & FileDescriptionRef ,
2526 _bytes : & mut [ u8 ] ,
2627 _ecx : & mut MiriInterpCx < ' tcx > ,
2728 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -32,6 +33,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
3233 fn write < ' tcx > (
3334 & mut self ,
3435 _communicate_allowed : bool ,
36+ _fd_ref : & FileDescriptionRef ,
3537 _bytes : & [ u8 ] ,
3638 _ecx : & mut MiriInterpCx < ' tcx > ,
3739 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -120,6 +122,7 @@ impl FileDescription for io::Stdin {
120122 fn read < ' tcx > (
121123 & mut self ,
122124 communicate_allowed : bool ,
125+ _fd_ref : & FileDescriptionRef ,
123126 bytes : & mut [ u8 ] ,
124127 _ecx : & mut MiriInterpCx < ' tcx > ,
125128 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -143,6 +146,7 @@ impl FileDescription for io::Stdout {
143146 fn write < ' tcx > (
144147 & mut self ,
145148 _communicate_allowed : bool ,
149+ _fd_ref : & FileDescriptionRef ,
146150 bytes : & [ u8 ] ,
147151 _ecx : & mut MiriInterpCx < ' tcx > ,
148152 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -171,6 +175,7 @@ impl FileDescription for io::Stderr {
171175 fn write < ' tcx > (
172176 & mut self ,
173177 _communicate_allowed : bool ,
178+ _fd_ref : & FileDescriptionRef ,
174179 bytes : & [ u8 ] ,
175180 _ecx : & mut MiriInterpCx < ' tcx > ,
176181 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -196,6 +201,7 @@ impl FileDescription for NullOutput {
196201 fn write < ' tcx > (
197202 & mut self ,
198203 _communicate_allowed : bool ,
204+ _fd_ref : & FileDescriptionRef ,
199205 bytes : & [ u8 ] ,
200206 _ecx : & mut MiriInterpCx < ' tcx > ,
201207 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -264,7 +270,7 @@ impl FileDescriptionRef {
264270 ecx : & mut InterpCx < ' tcx , MiriMachine < ' tcx > > ,
265271 ) -> InterpResult < ' tcx , ( ) > {
266272 use crate :: shims:: unix:: linux:: epoll:: EvalContextExt ;
267- ecx. check_and_update_readiness ( self . get_id ( ) , || self . borrow_mut ( ) . get_epoll_ready_events ( ) )
273+ ecx. check_and_update_readiness ( self )
268274 }
269275}
270276
@@ -567,7 +573,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
567573 // `usize::MAX` because it is bounded by the host's `isize`.
568574 let mut bytes = vec ! [ 0 ; usize :: try_from( count) . unwrap( ) ] ;
569575 let result = match offset {
570- None => fd. borrow_mut ( ) . read ( communicate, & mut bytes, this) ,
576+ None => fd. borrow_mut ( ) . read ( communicate, & fd , & mut bytes, this) ,
571577 Some ( offset) => {
572578 let Ok ( offset) = u64:: try_from ( offset) else {
573579 let einval = this. eval_libc ( "EINVAL" ) ;
@@ -625,7 +631,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
625631 } ;
626632
627633 let result = match offset {
628- None => fd. borrow_mut ( ) . write ( communicate, & bytes, this) ,
634+ None => fd. borrow_mut ( ) . write ( communicate, & fd , & bytes, this) ,
629635 Some ( offset) => {
630636 let Ok ( offset) = u64:: try_from ( offset) else {
631637 let einval = this. eval_libc ( "EINVAL" ) ;
0 commit comments