xcl run: name a title's deliberate write of a tag to address 0 in the crash line #1055
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1062"
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?
Imported from ivall/xcl. Originally posted by papasmurph0 on 2026-11-24T11:08:24Z.
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 onlywrite at address 0x0, which reads like a bug in XCL. The retail title of #505 does it twice:+0x23cf683writes0x4d8bd421;+0x2215c35writes0(#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 and lies in a title's image. The same bytes in any other module (XCL's own code, a system DLL) keep the plain line. Nothing else changes.What is in it
crates/xcl/src/eh.rs:deliberate_null_write(the instruction's tag),deliberate_crash_tag(a write to address 0 by that instruction inside a mapped title image, asked ofmodules::image_base_for_addr) and its use inunhandled_filter. Tests:a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash,only_a_title_image_s_write_to_address_0_is_named_a_deliberate_crash.Changed since the first version (
0117b92)main078358a; still one commit.code_athas its doc comment back (noted in three reviews).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4(XCL_DXC_DIRset) on head05d03e3: 3008 passed, 0 failed, 52 ignored. SKIPPED: 22 lines with "no wave64" (among themgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware), andheap_window_out_of_memory_falls_back_to_the_switch_form,two_pass_binds_set_the_shared_view_heap(no heap windows).0xc0000005after about 88 tests, and in that runtest_title_draws_with_a_root_signature_under_the_debug_layerfailed. Neither repeated: the library tests alone then passed twice (2856 passed, 0 failed, 32 ignored), that test passed alone, and the complete run above is clean. Onmain078358athe library tests alone: 2854 passed, 0 failed, 32 ignored. I do not know the cause of the one abort.Regression run
main:
this PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:25:01Z.
Full-suite run, since this PR has no test report yet. Tested exact head
0117b92(on its base384f7f7).Tested
cargo build --workspace, thenXCL_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.a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash.Not tested
AI use
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-24T14:54:07Z.
Linux (Wine + vkd3d-proton) + NVIDIA: with
0117b92the 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(onmain384f7f7) with #684 (e56dbc3) merged in, becausemainalone faults incopy_frombefore the watchdog.Tested
cargo test --release -p xcl --lib a_write_of_a_tagunder Wine, on the merge: 1 passed, 0 failed.Presents stopped at 102 s and the title ended itself at 130.6 s:
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 onlyC7 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.+0x2215c35, did not come in this run: the process ended on the first.+0x2215c35is 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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:04:40Z.
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!
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T18:54:53Z.
AMD RDNA3 full-suite run on exact head
0117b92(0117b92df882ded62dda4060a4f0444499ee4c2d), merged ontomain3f27770(clean merge, local detached merge commit, nothing pushed).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on the merged tree: 1356 passed, 2 failed, 46 ignored.eh::tests::a_write_of_a_tag_to_address_0_is_named_a_deliberate_crashpassed.maintoo:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.main3f27770alone, 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.main):f16_programs_on_the_gpuandf32_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
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-25T19:54:40Z.
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
0117b92df882ded62dda4060a4f0444499ee4c2d(merged cleanly ontomain2898511).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_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; includesa_write_of_a_tag_to_address_0_is_named_a_deliberate_crash)Not tested
AI use
main, ran the tests under Proton on this machine, and drafted this report.Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:24:09Z.
Review: COMMENTED
No concrete source-level defect found. Exact 11-byte matching avoids false labels and cross-page instruction reads are handled; unit and external evidence are sound. Current official Windows CI is not visible despite reported external full-suite/AMD evidence. Please refresh required CI, but I found no blocker.
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T05:17:30Z.
merge-check claim
head:
0117b92df8Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T05:24:02Z.
merge-check
base:
d52ff48caahead:
0117b92df8merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2876 passed, 2 failed, 51 ignored; 29 SKIPPED lines
failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16
failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check - diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base".
gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16fails on based52ff48cby itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-30T07:46:14Z.
Follow-up on the #1062 test result: the D16 failure is present on current
maind52ff48cand the clean #1062 merge, so it is not introduced by this PR. The fixture initializes v2/v3 and v6/v7 only inKernelState, then expects them in the output. The direct runner exports only vector registers the guest program touches; this fixture never reads those sentinels, so the result slots stay zero. Test fixture · runner export logic.I tested a test-only correction on
main: initialize the four sentinels in guest code withV_MOV_B32literal instructions before the queries. This preserves the original register-preservation assertions and makes the values observable. The focused test failed on unmodifiedmain(0 passed, 1 failed, 0 ignored) and passed with the candidate (1 passed, 0 failed, 0 ignored, 0 skips) on an RTX 3080 Ti (driver 621.40), Windows 11 build 26300, Rust 1.99.1 MSVC, DXC 1.8.2502.11.Candidate fixture diff
AI use: OpenAI Codex (GPT-6.2 Sol) ran the paired focused test and prepared this candidate; GPT-6.2 Astra checked the runner/register diagnosis.
Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T08:33:51Z.
merge-check claim
head:
0117b92df8Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T10:11:51Z.
merge-check
base:
d52ff48caahead:
0117b92df8merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2877 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (also fails on main
d52ff48c, fixed by #3513). New test eh::tests::a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash passes. 25 SKIPPED: 21 "no wave64", plus two_pass_binds_set_the_shared_view_heap and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache: Developer Mode needed).review: read the whole diff (crates/xcl/src/eh.rs +26). No blocker. (1) eh.rs:507-513: the new fn deliberate_null_write sits between the doc comment of code_at and code_at, so code_at loses its doc line (cosmetic). (2) The raw read at eh.rs:79 is guarded by code_bytes_at(addr, 11) >= 11 (page-aware, uses the readable check), so the handler cannot fault; it runs only for a write fault at address 0 and only adds text to the crash line. (3) The test covers the byte matcher only, not the filter path. No game data in the diff.
performance: none in normal runs; the code runs only inside the unhandled-exception filter, on a crash.
verdict: safe to merge
hardware / tool and model: Claude Code, Claude Opus 5.5 (review) and Claude Sonnet 5.5 (build, tests, draft). NVIDIA RTX 4090, driver 621.40; i9-13900K; Windows 11 Pro 10.0.26300; rustc 1.100.0; debug.
Imported from ivall/xcl. Originally posted by Blelle on 2026-11-30T10:13:30Z.
merge-check
base:
9dfbe3ea66head:
0117b92df8merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2878 passed, 10 failed, 51 ignored; SKIPPED: 6 (1 no heap windows opt-in XCL_HEAP_WINDOWS=1, 1 no heap windows, 1 cannot disable Windows driver cache, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (also fails on base), gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3 (also fails on base), gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 (also fails on base), gpu::recomp::heap_window_tests::gpu_smem_flat_descriptor_windows_and_limits (also fails on base), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (also fails on base), gpu::recomp::tests::gpu_f32_compares_with_nan (also fails on base), gpu::recomp::tests::gpu_float_compares_random (also fails on base), gpu::recomp::tests::gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends (also fails on base), two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (gpu_two_pass_cache_e2e parent+child, also fails on base); eh::tests::a_write_of_a_tag_to_address_0_is_named_a_deliberate_crash passed
review: read the full diff (+26/-0 in crates/xcl/src/eh.rs) and checked #1607 plus open/merged PRs on eh.rs / #505 / #746 (no duplicate found). Matching is exact 11-byte
C7 04 25 00 00 00 00 imm32gated onExceptionInformation[0] == 1 && ExceptionInformation[1] == 0 && code_bytes_at(addr, 11) >= 11. Minor non-blocking nit:deliberate_null_writewas inserted immediately belowcode_at's doc comment (/// The first 16 code bytes atrip...), leavingcode_atwithout its doc comment. Unit test coversdeliberate_null_writedirectly rather thanunhandled_filterend-to-end; no retail-game smoke run performed here.performance: none (only runs inside
unhandled_filteron an unhandled write access violation at address 0).verdict: safe to merge
hardware / tool and model: AMD Radeon RX 9060 XT 16 GB (driver 32.0.32029.2010), AMD Ryzen 5 9600X, 32 GB RAM, Windows build 26200.9974 (25H2), rustc 1.100.1 (20ddd0171 2026-11-25) MSVC, DXC 1.9.2602.17 / Antigravity, Gemini 4 Neon
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:43:25Z.
Triage (#1607) – head
0117b92No open or merged PR makes the same change; main's
eh.rshas nothing that names amov dword ptr [0], imm32write.One small problem in
eh.rs:deliberate_null_writeand its doc comment are inserted betweencode_at's doc comment ("The first 16 code bytes atrip, as hex") andcode_at. That line now documentsdeliberate_null_writeandcode_athas none. The match (C7 04 25 00000000, imm32 at bytes 7-10, read only when 11 bytes are readable) and the test are correct.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by hackluminence on 2026-12-02T18:14:12Z.
merge-check
base:
817eb1fc9fhead:
0117b92df8merge: clean, uncommitted trial-merge tree 344db35f078a1443208b98cbfe6a6fc46b513900. git diff --cached --check passed.
build: cargo build --workspace -> ok on the merged tree. Clean main and original head also built in release mode for the retail comparison.
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3004 passed, 1 failed, 52 ignored across 44 harnesses, exit 101. SKIPPED: 28 notices (22 no native wave64, 2 no heap windows, 3 missing D3D12 debug-layer components, 1 cannot disable the driver cache). XCL_SAMPLE_* unset. The new decoder test passed. The failing test was hle::d3d12x::vram::tests::spares_stay_out_of_dump_tracking_until_handed_out. It stopped at “spares were made for it” in vram.rs:6305. A single exact-name rerun on the merge passed, with no skip. It also passed in the complete four-thread unmodified base library run (2852 passed, 0 failed, 32 ignored). The one failing run on the merge remains unexplained.
title run: Fresh 60-second retail smoke runs on clean main and clean original head both exited 0 with zero crashes and zero device removals. No world entry or real crash-line observation confirmed. The report-writing behavior was exercised separately using synthetic records.
review: The process-wide unhandled-exception filter labels the recognized store “the title's own deliberate crash” regardless of which module owns the instruction (eh.rs:80–82 in the trial merge). A separate test fixture passed synthetic records directly to the real filter. With the reported address verified inside the native host test executable and outside all title mappings, the merged logger named that executable and still blamed the title. The read control kept its generic diagnostic. Two supplemental checks: base 2 passed, 0 failed; merge 1 passed, 1 failed. Neither ran the fixture bytes or raised an OS exception. Code review covered the full one-file +26-line diff. The decoder checks the length, encoding and little-endian tag; access type and destination are checked at the call site. The PR's unit test covers the decoder, not source attribution. A doc comment describing code_at's hex output has also moved onto the new decoder.
performance: The added work occurs during unhandled-exception reporting. No normal frame-path operations changed. The clean original head showed 281 frames and 15753 MB peak commit, versus 1443 frames and 15867 MB on current main. Frames were 19.5% of base (required >=80%) and peak commit was 99.3% (required <=125%). The original branch is 2112 main commits behind. This pair cannot isolate the cost of the logging change.
verdict: not yet: a confirmed diagnostic regression attributes a host-module write to the title. Check the instruction address against mapped title images before attributing ownership, or describe only the observed store. Add a filter-level test with a host-owned address.
hardware / tool and model: NVIDIA GeForce RTX 5060 Ti, driver 32.0.16.2101, Intel Core i5-14400, Windows 11 Enterprise build 26300, Rust 1.100.1 stable-x86_64-pc-windows-msvc, DXC 1.9 / Codex, GPT-6.2 Astra.
Imported from ivall/xcl. Originally posted by papasmurph0 on 2026-12-03T00:33:21Z.
Thanks for the tests and the checks on this.
@hackluminence: your merge-check was right, the line named the title wherever the instruction was. Head
05d03e3(one commit, rebased ontomain078358a) adds the label only when the faulting instruction is inside a mapped title image; the same bytes in host-owned memory keep the plain line.only_a_title_image_s_write_to_address_0_is_named_a_deliberate_crashcovers host-owned memory, the same memory registered as a title image, a read, a write elsewhere and another instruction. It tests the decision the filter makes, not the filter with a raised exception; that is listed under Not tested. The frame difference in your pair came from the old base (the branch was 2,122 commits behindmain); the description has a fresh pair on the rebased head: 1647 frames onmain, 1641 on this head.code_athas its doc comment back (Pipodi, Blelle and Foniass pointed it out).The earlier reports and merge-checks were made on
0117b92. The instruction match is unchanged, so the crash line Royalflamejlh got under Wine should read the same on this head; it was not re-run.Full suite on this head on an RTX 4080 SUPER: 3008 passed, 0 failed, 52 ignored. The details, and one first run that aborted and did not repeat, are in the description.
AI use: Claude Code (Claude Fable 5.2) made the change, ran the tests and the two regression runs, and wrote this note.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T00:35:28Z.
Follow-up review of
05d03e36, since0117b92(code reading only, not a merge-check) · no new findingsIn short: Since the triage note on
0117b92, the PR was rebased and reworked. A write of a tag to address 0 is now named only when the instruction is in a title's image, throughdeliberate_crash_tag. The same bytes in XCL's own code or a system DLL are not named. A test covers each case. The doc-comment point from the triage is fixed, and nothing blocks it.Checked and fine
code_atlost its doc comment. The new helpers now sit above "The first 16 code bytes atrip, as hex", which documentscode_atagain (eh.rs~520).deliberate_crash_tagrequires a write (access == 1), target 0, an address inside a mapped title image (modules::image_base_for_addr), and 11 readable code bytes, before it reads the instruction.image_base_for_addris lock-free (RANGES.lookup), so the crash filter takes no lock for it. The filter already uses it elsewhere (~35, ~551).deliberate_null_writematchesC7 04 25 00000000 imm32and reads the tag little-endian from bytes 7-10.only_a_title_image_s_write_to_address_0_is_named_a_deliberate_crashcovers the bytes outside any image, inside a registered image, a read of address 0, a write elsewhere, another offset, and afterunregister_mapped, and frees its memory.eh.rsonly, one commit.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.