@@ -402,8 +402,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
402
402
let this = self . eval_context_mut ( ) ;
403
403
404
404
let epfd = this. read_scalar ( epfd) ?. to_i32 ( ) ?;
405
+ let events = this. read_immediate ( events_op) ?;
405
406
let maxevents = this. read_scalar ( maxevents) ?. to_i32 ( ) ?;
406
407
let timeout = this. read_scalar ( timeout) ?. to_i32 ( ) ?;
408
+
407
409
if epfd <= 0 || maxevents <= 0 {
408
410
let einval = this. eval_libc ( "EINVAL" ) ;
409
411
this. set_last_error ( einval) ?;
@@ -412,8 +414,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
412
414
413
415
// This needs to come after the maxevents value check, or else maxevents.try_into().unwrap()
414
416
// will fail.
415
- let event = this. deref_pointer_as (
416
- events_op ,
417
+ let events = this. deref_pointer_as (
418
+ & events ,
417
419
this. libc_array_ty_layout ( "epoll_event" , maxevents. try_into ( ) . unwrap ( ) ) ,
418
420
) ?;
419
421
@@ -432,7 +434,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
432
434
let ready_list = epoll_file_description. get_ready_list ( ) ;
433
435
let mut ready_list = ready_list. borrow_mut ( ) ;
434
436
let mut num_of_events: i32 = 0 ;
435
- let mut array_iter = this. project_array_fields ( & event ) ?;
437
+ let mut array_iter = this. project_array_fields ( & events ) ?;
436
438
437
439
while let Some ( ( epoll_key, epoll_return) ) = ready_list. pop_first ( ) {
438
440
// If the file description is fully close, the entry for corresponding FdID in the
0 commit comments