Crash with 0xc000001d (illegal instruction): game uses AMD-only CLZERO, unsupported on Intel CPUs #106

Open
opened 2026-11-26 03:50:24 +00:00 by github-bot · 4 comments
Owner

@⁠KiBenYT on GitHub · 2026-11-24 00:33 UTC · original

game_scarlett_master.exe crashes ~1.3 s after the first frame with 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x4ecc84a.

Running under Intel SDE shows why:

SDE-ERROR: Executed instruction not valid for specified chip (FUTURE): clzero
Instruction bytes are: 0f 01 fc

CLZERO is AMD-only (Zen), so any Intel CPU raises #UD. (The SDE site differs from the native crash site, so there may be several; I haven't confirmed the native one is also clzero.)

Suggestion: emulate it in a vectored exception handler. On EXCEPTION_ILLEGAL_INSTRUCTION with bytes 0f 01 fc at RIP, zero 64 bytes at RAX & !63, add 3 to RIP, and continue.

Environment: Windows 11, Intel Xeon E5 2680 v4 (X99), RX 580, 16 GB RAM.

If required, log will be attached.

**@⁠KiBenYT** on GitHub · 2026-11-24 00:33 UTC · [original](https://github.com/Marvisak/VIctory/issues/106) game_scarlett_master.exe crashes ~1.3 s after the first frame with 0xc000001d at victory-image-b99f876b74d4a77f.dll+0x4ecc84a. Running under Intel SDE shows why: SDE-ERROR: Executed instruction not valid for specified chip (FUTURE): clzero Instruction bytes are: 0f 01 fc CLZERO is AMD-only (Zen), so any Intel CPU raises #UD. (The SDE site differs from the native crash site, so there may be several; I haven't confirmed the native one is also clzero.) Suggestion: emulate it in a vectored exception handler. On EXCEPTION_ILLEGAL_INSTRUCTION with bytes 0f 01 fc at RIP, zero 64 bytes at RAX & !63, add 3 to RIP, and continue. Environment: Windows 11, Intel Xeon E5 2680 v4 (X99), RX 580, 16 GB RAM. If required, log will be attached.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:50:25 +00:00
Author
Owner

@⁠TheGentlemannn on GitHub · 2026-11-24 00:34 UTC · original

its criminal how youre trying to run this with a RX 580

**@⁠TheGentlemannn** on GitHub · 2026-11-24 00:34 UTC · [original](https://github.com/Marvisak/VIctory/issues/106#issuecomment-7118202599) its criminal how youre trying to run this with a RX 580
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:38 UTC · original

This is the same class as #7/#102/#103: the loader's illegal-instruction handler (crates/victory-loader/src/crash.rs) emulates the console-CPU instructions an Intel host lacks, and the missing ones are being added in open work.

  • CLZERO: a single clzero is already handled on main (0f 01 fc → zero the 64-byte line at rax).
  • CLZERO loops and rdpru: #34 (open, faa0a9a) rewrites the handler so a compiler's clzero/monitorx/mwaitx loop completes in one exception and adds rdpu (0f 01 fd). That looks like the missing piece for a title that spins on clzero.
  • For reference, #45 (now merged in 7d33c46) is the CLWB counterpart for Intel CPUs before Ice Lake.

If it still faults with #34 on top, the useful next datum is the crash log line with the exception address and the exact CPU model — the handler matches instruction bytes, so that tells which encoding it did not recognise.

No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:38 UTC · [original](https://github.com/Marvisak/VIctory/issues/106#issuecomment-7118278262) This is the same class as #7/#102/#103: the loader's illegal-instruction handler (`crates/victory-loader/src/crash.rs`) emulates the console-CPU instructions an Intel host lacks, and the missing ones are being added in open work. - **CLZERO**: a single `clzero` is already handled on `main` (`0f 01 fc` → zero the 64-byte line at `rax`). - **CLZERO loops and `rdpru`**: **#34** (open, `faa0a9a`) rewrites the handler so a compiler's `clzero`/`monitorx`/`mwaitx` loop completes in one exception and adds `rdpu` (`0f 01 fd`). That looks like the missing piece for a title that spins on `clzero`. - For reference, **#45** (now merged in `7d33c46`) is the CLWB counterpart for Intel CPUs before Ice Lake. If it still faults with #34 on top, the useful next datum is the crash log line with the exception address and the exact CPU model — the handler matches instruction bytes, so that tells which encoding it did not recognise. No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠Sunkiller-qc on GitHub · 2026-11-24 12:54 UTC · original

The native crash offset here, +0x4ecc84a, is the same one as #103, #108 and #210, and on those it's a clwb, not clzero. clwb emulation for Intel CPUs before Ice Lake landed in #45 (7d33c46, merged 00:30 UTC, a few minutes before this report). clzero was already handled by #10 (d348b9a).

On #108, the same crash went away after pulling 7d33c46. Could you pull main, rebuild, and check whether it still happens? If it doesn't, this can be closed.

**@⁠Sunkiller-qc** on GitHub · 2026-11-24 12:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/106#issuecomment-7132071603) The native crash offset here, `+0x4ecc84a`, is the same one as #103, #108 and #210, and on those it's a `clwb`, not `clzero`. `clwb` emulation for Intel CPUs before Ice Lake landed in #45 (`7d33c46`, merged 00:30 UTC, a few minutes before this report). `clzero` was already handled by #10 (`d348b9a`). On #108, the same crash went away after pulling `7d33c46`. Could you pull main, rebuild, and check whether it still happens? If it doesn't, this can be closed.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:47 UTC · original

Automated triage for the maintainers.

The native crash offset here, +0x4ecc84a, is the same clwb site as #102 (where this crash is tracked), #103 and #108; the Xeon E5-2680 v4 (Broadwell) has no clwb. On main, the loader's handler emulate_amd_only in crates/victory-loader/src/crash.rs already did what you suggest for clzero (bytes 0f 01 fc, zeroing the line at rax, with the surrounding loop done in one exception, see clzero) since #10, and emulates clwb since #45 (7d33c46, merged shortly before this report). On #108 another E5-2680 v4 user got past this crash after updating. Could you pull current main, rebuild and say whether it still happens? If it does, please attach crashes.log and the VIctory commit.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/106#issuecomment-7149969554) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T12:54:01Z at=2026-11-25T01:51:50Z --> Automated triage for the maintainers. The native crash offset here, `+0x4ecc84a`, is the same `clwb` site as #102 (where this crash is tracked), #103 and #108; the Xeon E5-2680 v4 (Broadwell) has no `clwb`. On `main`, the loader's handler `emulate_amd_only` in `crates/victory-loader/src/crash.rs` already did what you suggest for `clzero` (bytes `0f 01 fc`, zeroing the line at `rax`, with the surrounding loop done in one exception, see `clzero`) since #10, and emulates `clwb` since #45 (`7d33c46`, merged shortly before this report). On #108 another E5-2680 v4 user got past this crash after updating. Could you pull current `main`, rebuild and say whether it still happens? If it does, please attach `crashes.log` and the VIctory commit. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#106
No description provided.