@@ -29,6 +29,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
2929 fn read < ' tcx > (
3030 & mut self ,
3131 _communicate_allowed : bool ,
32+ _fd_ref : & FileDescriptionRef ,
3233 _bytes : & mut [ u8 ] ,
3334 _ecx : & mut MiriInterpCx < ' tcx > ,
3435 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -39,6 +40,7 @@ pub trait FileDescription: std::fmt::Debug + Any {
3940 fn write < ' tcx > (
4041 & mut self ,
4142 _communicate_allowed : bool ,
43+ _fd_ref : & FileDescriptionRef ,
4244 _bytes : & [ u8 ] ,
4345 _ecx : & mut MiriInterpCx < ' tcx > ,
4446 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -127,6 +129,7 @@ impl FileDescription for io::Stdin {
127129 fn read < ' tcx > (
128130 & mut self ,
129131 communicate_allowed : bool ,
132+ _fd_ref : & FileDescriptionRef ,
130133 bytes : & mut [ u8 ] ,
131134 _ecx : & mut MiriInterpCx < ' tcx > ,
132135 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -150,6 +153,7 @@ impl FileDescription for io::Stdout {
150153 fn write < ' tcx > (
151154 & mut self ,
152155 _communicate_allowed : bool ,
156+ _fd_ref : & FileDescriptionRef ,
153157 bytes : & [ u8 ] ,
154158 _ecx : & mut MiriInterpCx < ' tcx > ,
155159 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -178,6 +182,7 @@ impl FileDescription for io::Stderr {
178182 fn write < ' tcx > (
179183 & mut self ,
180184 _communicate_allowed : bool ,
185+ _fd_ref : & FileDescriptionRef ,
181186 bytes : & [ u8 ] ,
182187 _ecx : & mut MiriInterpCx < ' tcx > ,
183188 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -203,6 +208,7 @@ impl FileDescription for NullOutput {
203208 fn write < ' tcx > (
204209 & mut self ,
205210 _communicate_allowed : bool ,
211+ _fd_ref : & FileDescriptionRef ,
206212 bytes : & [ u8 ] ,
207213 _ecx : & mut MiriInterpCx < ' tcx > ,
208214 ) -> InterpResult < ' tcx , io:: Result < usize > > {
@@ -271,7 +277,7 @@ impl FileDescriptionRef {
271277 ecx : & mut InterpCx < ' tcx , MiriMachine < ' tcx > > ,
272278 ) -> InterpResult < ' tcx , ( ) > {
273279 use crate :: shims:: unix:: linux:: epoll:: EvalContextExt ;
274- ecx. check_and_update_readiness ( self . get_id ( ) , || self . borrow_mut ( ) . get_epoll_ready_events ( ) )
280+ ecx. check_and_update_readiness ( self )
275281 }
276282}
277283
@@ -574,7 +580,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
574580 // `usize::MAX` because it is bounded by the host's `isize`.
575581 let mut bytes = vec ! [ 0 ; usize :: try_from( count) . unwrap( ) ] ;
576582 let result = match offset {
577- None => fd. borrow_mut ( ) . read ( communicate, & mut bytes, this) ,
583+ None => fd. borrow_mut ( ) . read ( communicate, & fd , & mut bytes, this) ,
578584 Some ( offset) => {
579585 let Ok ( offset) = u64:: try_from ( offset) else {
580586 let einval = this. eval_libc ( "EINVAL" ) ;
@@ -632,7 +638,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
632638 } ;
633639
634640 let result = match offset {
635- None => fd. borrow_mut ( ) . write ( communicate, & bytes, this) ,
641+ None => fd. borrow_mut ( ) . write ( communicate, & fd , & bytes, this) ,
636642 Some ( offset) => {
637643 let Ok ( offset) = u64:: try_from ( offset) else {
638644 let einval = this. eval_libc ( "EINVAL" ) ;
0 commit comments