Crash reports: name the host's CPU and Windows build #213
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!213
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/213/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Dufftwt on GitHub · 2026-11-24 01:28 UTC · original
Dufftwt:fix/crash-log-names-host→main· +74 −5 · 2 files · 1 commits · merged 2026-11-25 00:16 UTCWhat's wrong
Two facts about the host decide whether many crashes are bugs at all, and a crash report contains neither:
clwbbefore Ice Lake,clzero,monitorx, SSE4a…). The loader emulates the ones it knows. Whether an0xc000001dis a known case, an unknown instruction or something else depends entirely on the CPU.Neither is in the console output or in
crashes.log. So every report needs a follow-up question, or reporters type their specs by hand, and some guess wrong (#103 guessed at the instruction without knowing it depended on the CPU generation).What the fix does
In
crash.rs:log_crashes_to, at title start), the loader reads two values once:cpuidleaves0x80000002–0x80000004;RtlGetVersion.GetVersionExwould return whatever the executable's manifest declares instead.log_crash) now end with one more line,host: <CPU>, Windows <major.minor.build>. It comes just before the title's last debug output, which those reports already end with.At crash time nothing is queried: the line was formatted at startup. First-chance reports don't change.
victory-loadergets two morewindows-sysfeatures forRtlGetVersionand its structure:Wdk_System_SystemServicesandWin32_System_SystemInformation. It already usesWdk_System_Threading.How it behaves after the fix
The same line goes to
crashes.log, so a pasted report or log file says by itself what machine it came from.Tests
The new test
the_host_line_names_the_cpu_and_windowschecks that the line has the formhost: <non-empty CPU name>, Windows <a>.<b>.<c>with a major version of 10 or more.I ran
cargo test --workspaceon GitHub'swindows-latestwith Rust 1.98.1 fromrust-toolchain.toml:victory-loaderhas 19 passed, the other crates have 0 failed. On that runner the new test's line ishost: AMD EPYC 9V74 80-Core Processor, Windows 10.0.26100.mainthe report ends with the stack: With this PR:--test-threads=1. With 4 threads, the shader crate's GPU tests sometimes crash on that runner (STATUS_ACCESS_VIOLATION), on unmodifiedmainas well.Not tested: a crash in the title.
Related: #7, #84, #102, #103, #106. It touches different lines of
crash.rsthan #198 and #204 and merges cleanly with both.@jeremygold02 on GitHub · 2026-11-24 05:04 UTC · original
Thanks @Dufftwt for making the host line in crash reports identify the CPU and Windows build.
I tested commit
7f00a62a4b861f0a051cc600470ce0570ab43c6fwith:The targeted test passed (1 passed, 0 failed; 18 filtered).
the_host_line_names_the_cpu_and_windowsverifies thehost:line framing and newline, requires a nonempty CPU name without surrounding whitespace or NULs, and checks for three numeric Windows version components with a major version of at least 10.This validates the formatted host-information line. It does not generate or inspect a full crash report from an actual exception.
@Marvisak on GitHub · 2026-11-25 00:23 UTC · original
Automated triage for the maintainers.
Merge candidate. This adds a
host: <CPU brand string>, Windows <major.minor.build>line to crash reports, panics andlog_crashoutput incrates/victory-loader/src/crash.rs, computed once inlog_crashes_tofromcpuidleaves 0x80000002-4 andRtlGetVersion, so nothing is queried at crash time. TheCargo.tomlchange only enables two more features ofwindows-sys, which the loader already uses; no new dependency. Small note: first-chance breakpoint reports (VICTORY_CRASH_BREAKPOINTS=1) go through the same path and will carry the line too, contrary to the PR body; harmless.CI: no check runs on the head commit.
Generated by Claude Code