Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drop racy STOP_BIT assertion from eval-breaker test
The isolated test asserted a clear process-wide eval breaker, and
cleared STOP_BIT itself. Parallel STW tests flicker that word, so
Windows rust tests failed after #8786.

Assisted-by: Grok:4.6
  • Loading branch information
youknowone committed Sep 22, 2026
commit f1fef34aaa6acc96c5ceca95f4d8fddae913768e
14 changes: 4 additions & 10 deletions crates/vm/src/vm/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1851,26 +1851,20 @@ for _ in range(40):
worker.join().expect("worker panicked");
}

/// Per-thread `stop_requested` must trip the eval breaker even when the
/// process-wide `STOP_BIT` is clear.
/// Per-thread `stop_requested` must trip the eval breaker on its own.
/// Do not touch or assert the process-wide eval-breaker word: other tests
/// in this process may be flickering `STOP_BIT` at the same time.
#[cfg(feature = "threading")]
#[test]
fn eval_breaker_tripped_when_stop_requested_and_stop_bit_clear() {
fn eval_breaker_tripped_when_stop_requested() {
let interp = Interpreter::without_stdlib(Default::default());
interp.enter(|vm| {
crate::signal::clear_stop_bit();
assert!(
crate::vm::thread::set_stop_requested_for_current_thread(true),
"current thread has no stop_requested flag"
);
crate::signal::clear_stop_bit();
let pending = crate::signal::eval_breaker_pending();
let tripped = vm.eval_breaker_tripped();
crate::vm::thread::set_stop_requested_for_current_thread(false);
assert!(
!pending,
"STOP_BIT or another process-wide breaker bit was set"
);
assert!(tripped);
});
}
Expand Down