xcl run: name a title's deliberate write of a tag to address 0 in the crash line #1062

Open
github-bot wants to merge 1 commit from github-bot/gh-1062 into main AGit
Owner

@⁠papasmurph0 on GitHub · 2026-11-24 11:08 UTC · original
papasmurph0:log-deliberate-null-write → main · +26 −0 · 1 files · 1 commits · open

Part of #505; the stop of #746 is the second of the two below.

Titles end themselves on purpose with mov dword ptr [0], imm32. XCL's line for the unhandled exception showed only write at address 0x0, which reads like a bug in XCL. The retail title of #505 does it twice:

  • its GPU watchdog ("GPU Loc Sig") at +0x23cf683 writes 0x4d8bd421;
  • when the watchdog's function returns, its thread's exit path at +0x2215c35 writes 0 (#746).

Read from the title's code: the watchdog function reports the stall, then reaches the write on both of its paths; after the write it only returns (add rsp, 0x48; ret). The thread procedure that called it calls an optional hook, then writes 0 to address 0.

The crash line now ends with – the title's own deliberate crash: mov dword ptr [0], <tag> when the faulting instruction is that one. Nothing else changes.

What is in it

  • crates/xcl/src/eh.rs: deliberate_null_write (the instruction's tag) and its use in unhandled_filter for a write at address 0. Test: a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash.

Tested

  • NVIDIA GeForce RTX 4080 SUPER (driver 32.0.16.1088), Ryzen 7 7800X3D, Windows 11 build 26200, rustc 1.100.0 MSVC, release.
  • cargo test --release --workspace -- --test-threads=4 (XCL_DXC_DIR set): 738 passed, 0 failed, 41 ignored. SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).
  • The two addresses and instructions above are from runs of the retail title of #505 on this machine and from its code bytes.

Regression run

main:

xcl-smoke v1
commit: 384f7f7f8c79fa4d4dee59336d650a4021af4c7e
gpu: NVIDIA GeForce RTX 4080 SUPER
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1322 (PresentX 1322)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 15231 MB

this PR:

xcl-smoke v1
commit: 0117b92df882ded62dda4060a4f0444499ee4c2d
gpu: NVIDIA GeForce RTX 4080 SUPER
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1389 (PresentX 1389)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14997 MB

Not tested

  • A crash line written by this change in a real run: neither 60 s run reaches the title's world load, where it ends itself; the test covers the instruction match.
  • AMD and Intel GPUs; Wine.
  • An earlier pair of runs had a higher peak commit (14.9 GB against 9.1 GB for main) while an offline pipeline builder held 75 GB of commit on the same machine; the pair above was made after it was stopped.

AI use

  • Claude Code with Claude Opus 5.5: read the title's code at the two addresses, wrote the change, the test and this description; the runs were made on my PC.

https://claude.ai/code/session_01SEW8zXNUmMq1tRUZpstWXS

**@⁠papasmurph0** on GitHub · 2026-11-24 11:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062) `papasmurph0:log-deliberate-null-write` → `main` · +26 −0 · 1 files · 1 commits · open Part of #505; the stop of #746 is the second of the two below. Titles end themselves on purpose with `mov dword ptr [0], imm32`. XCL's line for the unhandled exception showed only `write at address 0x0`, which reads like a bug in XCL. The retail title of #505 does it twice: - its GPU watchdog ("GPU Loc Sig") at `+0x23cf683` writes `0x4d8bd421`; - when the watchdog's function returns, its thread's exit path at `+0x2215c35` writes `0` (#746). Read from the title's code: the watchdog function reports the stall, then reaches the write on both of its paths; after the write it only returns (`add rsp, 0x48; ret`). The thread procedure that called it calls an optional hook, then writes 0 to address 0. The crash line now ends with `– the title's own deliberate crash: mov dword ptr [0], <tag>` when the faulting instruction is that one. Nothing else changes. **What is in it** - `crates/xcl/src/eh.rs`: `deliberate_null_write` (the instruction's tag) and its use in `unhandled_filter` for a write at address 0. Test: `a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash`. **Tested** - NVIDIA GeForce RTX 4080 SUPER (driver 32.0.16.1088), Ryzen 7 7800X3D, Windows 11 build 26200, rustc 1.100.0 MSVC, release. - `cargo test --release --workspace -- --test-threads=4` (`XCL_DXC_DIR` set): 738 passed, 0 failed, 41 ignored. SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). - The two addresses and instructions above are from runs of the retail title of #505 on this machine and from its code bytes. **Regression run** main: ``` xcl-smoke v1 commit: 384f7f7f8c79fa4d4dee59336d650a4021af4c7e gpu: NVIDIA GeForce RTX 4080 SUPER title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1322 (PresentX 1322) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 15231 MB ``` this PR: ``` xcl-smoke v1 commit: 0117b92df882ded62dda4060a4f0444499ee4c2d gpu: NVIDIA GeForce RTX 4080 SUPER title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1389 (PresentX 1389) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14997 MB ``` **Not tested** - A crash line written by this change in a real run: neither 60 s run reaches the title's world load, where it ends itself; the test covers the instruction match. - AMD and Intel GPUs; Wine. - An earlier pair of runs had a higher peak commit (14.9 GB against 9.1 GB for `main`) while an offline pipeline builder held 75 GB of commit on the same machine; the pair above was made after it was stopped. **AI use** - Claude Code with Claude Opus 5.5: read the title's code at the two addresses, wrote the change, the test and this description; the runs were made on my PC. https://claude.ai/code/session_01SEW8zXNUmMq1tRUZpstWXS
Titles end themselves on purpose with `mov dword ptr [0], imm32`. XCL's line
for the unhandled exception showed only "write at address 0x0", which reads
like a bug of XCL's own. The retail title of #505 does it twice: its GPU
watchdog ("GPU Loc Sig") at +0x23cf683 writes 0x4d8bd421, and when that
watchdog's function returns, its thread's exit path at +0x2215c35 writes 0
(the stop of #746). Read from the title's code: the watchdog's function
reports the stall, then reaches the write on both of its paths; after the
write it only returns; the thread procedure calls an optional hook and then
writes 0 to address 0.

The crash line now ends with "the title's own deliberate crash: mov dword
ptr [0], <tag>" when the faulting instruction is that one.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:15 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:25 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head 0117b92 (on its base 384f7f7).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 738 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062#issuecomment-7134338383) Full-suite run, since this PR has no test report yet. Tested exact head `0117b92` (on its base `384f7f7`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **738 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash`. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 14:54 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA: with 0117b92 the crash line of a run that ends at the title's GPU watchdog names it, with the tag the description gives. 1 run.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), XCL_NETWORK=0, XCL_PSO_PRELOAD=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s, 140 s asked for. 0117b92 (on main 384f7f7) with #684 (e56dbc3) merged in, because main alone faults in copy_from before the watchdog.

Tested

  • cargo test --release -p xcl --lib a_write_of_a_tag under Wine, on the merge: 1 passed, 0 failed.

Presents stopped at 102 s and the title ended itself at 130.6 s:

[  130.633] unhandled exception 0xc0000005 in game+0x23cf683 (write at address 0x0) – the title's own deliberate crash: mov dword ptr [0], 0x4d8bd421 rax=0x0 rbx=0x0 …; on the stack: kernelbase.dll+0x663ac, game+0x4e4ba89, game+0x2215c35, game+0x71b9a20, game+0x2215eca, kernel32.dll+0x11709

The same stop without this change reads … (write at address 0x0) rax=0x0 … (the base runs of our reports on #684 and #899).

Read

  • eh.rs:276 (deliberate_null_write, used at :82) matches only C7 04 25 00 00 00 00 imm32, and the text is added after (write at address 0x0) and before the registers, so a tool that reads the module and offset from the start of the line still finds them. Ours did.
  • The second write the description names, 0 at +0x2215c35, did not come in this run: the process ended on the first. +0x2215c35 is on the stack of the line above, as the description says of the thread procedure.

Not tested: the stop of #746 at +0x2215c35; the rest of the test suite.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title once and wrote this note.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 14:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062#issuecomment-7135134131) Linux (Wine + vkd3d-proton) + NVIDIA: with `0117b92` the crash line of a run that ends at the title's GPU watchdog names it, with the tag the description gives. 1 run. **Setup:** Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to `x86_64-pc-windows-gnu` (rustc 1.98.0), `XCL_NETWORK=0`, `XCL_PSO_PRELOAD=0`. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s, 140 s asked for. `0117b92` (on `main` `384f7f7`) with #684 (`e56dbc3`) merged in, because `main` alone faults in `copy_from` before the watchdog. **Tested** - `cargo test --release -p xcl --lib a_write_of_a_tag` under Wine, on the merge: 1 passed, 0 failed. Presents stopped at 102 s and the title ended itself at 130.6 s: ``` [ 130.633] unhandled exception 0xc0000005 in game+0x23cf683 (write at address 0x0) – the title's own deliberate crash: mov dword ptr [0], 0x4d8bd421 rax=0x0 rbx=0x0 …; on the stack: kernelbase.dll+0x663ac, game+0x4e4ba89, game+0x2215c35, game+0x71b9a20, game+0x2215eca, kernel32.dll+0x11709 ``` The same stop without this change reads `… (write at address 0x0) rax=0x0 …` (the base runs of our reports on #684 and #899). **Read** - `eh.rs:276` (`deliberate_null_write`, used at `:82`) matches only `C7 04 25 00 00 00 00 imm32`, and the text is added after `(write at address 0x0)` and before the registers, so a tool that reads the module and offset from the start of the line still finds them. Ours did. - The second write the description names, 0 at `+0x2215c35`, did not come in this run: the process ended on the first. `+0x2215c35` is on the stack of the line above, as the description says of the thread procedure. **Not tested:** the stop of #746 at `+0x2215c35`; the rest of the test suite. **AI use:** Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title once and wrote this note.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 09:04 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 09:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062#issuecomment-7157843631) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 18:54 UTC · original

AMD RDNA3 full-suite run on exact head 0117b92 (0117b92df882ded62dda4060a4f0444499ee4c2d), merged onto main 3f27770 (clean merge, local detached merge commit, nothing pushed).

Tested

  • AMD Radeon RX 7800 XT (driver 32.0.31035.1003, wave64 hardware), Ryzen 7 5700X3D, Windows 11 Pro 10.0.26200, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100.0, debug build.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the merged tree: 1356 passed, 2 failed, 46 ignored. eh::tests::a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash passed.
  • The 2 failures are in main too: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.
  • Baseline, main 3f27770 alone, same command and machine: 1352 passed, 5 failed, 46 ignored. The 3 extra baseline failures (title_textures::placed_title_textures_share_vram_and_preserve_pixels, title_textures::transitions_apply_when_their_list_is_submitted, vram::d32s8_targets_take_their_own_size_of_video_memory) passed in this run; I did not rerun the baseline, so I can't say if they are flaky or load-dependent.
  • SKIPPED (the same set as on main): f16_programs_on_the_gpu and f32_programs_on_the_gpu (refusals for unsupported V_*_F16 forms), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Not tested

  • scripts/smoke.ps1 / the regression run, any retail title, a release build, other GPUs. A single run, not repeated.

AI use

  • Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report; I read the logs for the counts above.
**@⁠oni-swr** on GitHub · 2026-11-25 18:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062#issuecomment-7171573603) AMD RDNA3 full-suite run on exact head `0117b92` (`0117b92df882ded62dda4060a4f0444499ee4c2d`), merged onto `main` `3f27770` (clean merge, local detached merge commit, nothing pushed). **Tested** - AMD Radeon RX 7800 XT (driver 32.0.31035.1003, wave64 hardware), Ryzen 7 5700X3D, Windows 11 Pro 10.0.26200, rustc 1.100.0 MSVC, DXC from Windows SDK 10.0.26100.0, debug build. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the merged tree: **1356 passed, 2 failed, 46 ignored**. `eh::tests::a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash` passed. - The 2 failures are in `main` too: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier`. - Baseline, `main` `3f27770` alone, same command and machine: 1352 passed, 5 failed, 46 ignored. The 3 extra baseline failures (`title_textures::placed_title_textures_share_vram_and_preserve_pixels`, `title_textures::transitions_apply_when_their_list_is_submitted`, `vram::d32s8_targets_take_their_own_size_of_video_memory`) passed in this run; I did not rerun the baseline, so I can't say if they are flaky or load-dependent. - SKIPPED (the same set as on `main`): `f16_programs_on_the_gpu` and `f32_programs_on_the_gpu` (refusals for unsupported V_*_F16 forms), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). **Not tested** - `scripts/smoke.ps1` / the regression run, any retail title, a release build, other GPUs. A single run, not repeated. **AI use** - Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report; I read the logs for the counts above.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-25 19:54 UTC · original

Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head 0117b92df882ded62dda4060a4f0444499ee4c2d (merged cleanly onto main 2898511).

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu (debug)

Unit tests (XCL_REQUIRE_GPU=wave64, XCL_DXC_DIR, VKD3D_CONFIG=ignore_shared_fence, --test-threads=1 --nocapture)

  • eh::: 7 passed, 0 failed, 0 ignored (0 skipped; includes a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash)

Not tested

  • Full workspace test suite, native Windows, or a retail-title smoke pair.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto main, ran the tests under Proton on this machine, and drafted this report.
**@⁠ClosetPie107** on GitHub · 2026-11-25 19:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1062#issuecomment-7172930837) Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head `0117b92df882ded62dda4060a4f0444499ee4c2d` (merged cleanly onto `main` `2898511`). **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` (debug) **Unit tests** (`XCL_REQUIRE_GPU=wave64`, `XCL_DXC_DIR`, `VKD3D_CONFIG=ignore_shared_fence`, `--test-threads=1 --nocapture`) - `eh::`: **7 passed, 0 failed, 0 ignored** (0 skipped; includes `a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash`) **Not tested** - Full workspace test suite, native Windows, or a retail-title smoke pair. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto `main`, ran the tests under Proton on this machine, and drafted this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1062/head:github-bot/gh-1062'
git switch 'github-bot/gh-1062'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1062'
git switch 'github-bot/gh-1062'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1062'
git switch 'github-bot/gh-1062'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1062'
git switch 'main'
git merge --squash 'github-bot/gh-1062'
git switch 'main'
git merge --ff-only 'github-bot/gh-1062'
git switch 'main'
git merge 'github-bot/gh-1062'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.