File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -724,12 +724,12 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
724
724
) ;
725
725
this. unblock_thread ( next_thread_id, BlockReason :: Genmc ) ?;
726
726
}
727
- // Set the new active thread.
728
- let thread_manager = & mut this. machine . threads ;
729
- thread_manager. active_thread = next_thread_id;
730
- // A thread blocked by GenMC may get blocked again during the unblocking callback.
727
+ // The thread we just unblocked may have been blocked again during the unblocking callback.
731
728
// In that case, we need to ask for a different thread to run next.
732
- if thread_manager. threads [ thread_manager. active_thread ] . state . is_enabled ( ) {
729
+ let thread_manager = & mut this. machine . threads ;
730
+ if thread_manager. threads [ next_thread_id] . state . is_enabled ( ) {
731
+ // Set the new active thread.
732
+ thread_manager. active_thread = next_thread_id;
733
733
return interp_ok ( SchedulingAction :: ExecuteStep ) ;
734
734
}
735
735
}
You can’t perform that action at this time.
0 commit comments