diff --git a/crates/victory-loader/src/console_insn.rs b/crates/victory-loader/src/console_insn.rs index f785ed71a..45a31078b 100644 --- a/crates/victory-loader/src/console_insn.rs +++ b/crates/victory-loader/src/console_insn.rs @@ -117,11 +117,15 @@ fn clzero_stub(at: usize, stub: usize, cmp: [u8; 3]) -> Option> { /// Whether SSE4a `extrq` / `insertq` with immediate length and index are replaced the first /// time they fault by a jump to the same operation in SSE2 ([`sse4a_stub`]). Run 19:19 of -/// 2026-11-28: one `insertq xmm0, xmm1, 16, 16` faulted about 3,700 times a second. On by -/// default; `VICTORY_PATCH_SSE4A=0` emulates each time, as before. +/// 2026-11-28: one `insertq xmm0, xmm1, 16, 16` faulted about 3,700 times a second. +/// +/// Off by default (`VICTORY_PATCH_SSE4A=1` turns it on): on Intel, a second thread that +/// reaches the instruction while the first is replacing it can still end the run with +/// `0xc000001d` (#2393, #3775). The late-fault fix (#2585) makes that much rarer but not +/// impossible; emulating each time never crashes this way. fn patches_sse4a() -> bool { static ON: std::sync::OnceLock = std::sync::OnceLock::new(); - *ON.get_or_init(|| std::env::var_os("VICTORY_PATCH_SSE4A").is_none_or(|v| v != "0")) + *ON.get_or_init(|| std::env::var_os("VICTORY_PATCH_SSE4A").is_some_and(|v| v == "1")) } /// `op xmm(reg), xmm(rm)` with `prefix`.