Repository navigation
Conversation
|
Overlap note: #1523 (mine, opened earlier for #1487, mergeable, CI green) fixes the same crash. It replaces the This PR goes a step further by also removing the test's entries from Separately confirmed here (RTX 3070, Windows 11): the parallel AI-assisted (Claude Code). |
|
Review note on
|
|
A run under Wine on Linux, with vkd3d-proton as the host D3D12. The Tested
The abort is in the host's C heap (Wine / vkd3d-proton / the Vulkan driver) while devices are made in parallel. It may be a vkd3d-proton or driver problem rather than XCL's, and I have not narrowed it down. It occurs with and without this PR at about the same rate. Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
AMD Windows verification for PR #2002 at
|
| Pair | Current main | PR #2002 head |
|---|---|---|
| Queue slot + cross-queue cycle | 5/5 runs exited 0xc0000005 STATUS_ACCESS_VIOLATION before a test total |
5/5 runs passed, 2 passed, 0 failed, 0 ignored each |
| Queue slot + Wait64 before signal | 5/5 runs exited 0xc0000005 STATUS_ACCESS_VIOLATION before a test total |
5/5 runs passed, 2 passed, 0 failed, 0 ignored each |
cargo build --locked --workspace -j 2 also passed on the PR head. These runs exercise the reported test interaction and support the test-only crash fix on AMD. They do not establish that PR #2002 is preferable to the overlapping #1523, nor that the full workspace suite is green.
Not tested: Full library/workspace suite, retail title smoke, Intel/NVIDIA GPUs, or a merge of this older PR base with current main. No game data was used.
AI assistance: OpenAI Codex (GPT-6) ran the comparison and drafted this report.
Fixes #1978.
hle::d3d12x::real::queue_tests::queue_slot_18_before_the_layout_is_known_writes_8_bytespushed an unmapped sentinel address (0x5EED_0000) intoreal::FENCESand invokedqueue_dispatch(14, this, fence, 1, 0, 0)with a mocksignalreturning0(S_OK). Becausehr >= 0,queue_dispatchregistered that bogus pointer infence_x::FENCES(note_queue_signal) andlist_x::SYNC_GRAPH.title_fences(note_title_queue_signal), while the test only removed it fromreal::FENCES.Under
--test-threads=1,hle::d3d12x::list_x::tests::*ran alphabetically beforehle::d3d12x::real::queue_tests, hiding the bug. Under parallelcargo test,queue_testsfinished first and left0x5EED_0000inSYNC_GRAPH.title_fences; as soon as any concurrentlist_xtest ranwould_signal_close_cycle,prune_title_fence(0x5EED_0000, tf)calledID3D12Fence::GetCompletedValue()through the unmapped address and killed the test runner with0xc0000005 STATUS_ACCESS_VIOLATION.What is in it
0x5EED_0000sentinel inqueue_tests(crates/xcl/src/hle/d3d12x/real.rs) with a valid minimal stackID3D12FenceCOM vtable whoseGetCompletedValuereturnsu64::MAX, so any concurrentprune_title_fencecall during the test executes safely without UB.#[cfg(test)]cleanup helpersfence_x::forget_fence_for_test(crates/xcl/src/hle/d3d12x/fence_x.rs) andlist_x::forget_title_fence_for_test(crates/xcl/src/hle/d3d12x/list_x.rs), invoked from aDropguard inqueue_testsunder the respective locks before the stack mock objects go out of scope.#[cfg(test)]); no runtime code paths modified.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke.cargo test -p xcl --lib -- hle::d3d12x::real::queue_tests hle::d3d12x::list_xcrashed 3/3 runs with0xc0000005 STATUS_ACCESS_VIOLATION.cargo test -p xcl --lib -- hle::d3d12x::real::queue_tests hle::d3d12x::list_xpassed 10/10 consecutive parallel runs (28 passed, 0 failed each).cargo test -p xcl --lib -- hle::d3d12x: 5/5 parallel runs completed with 00xc0000005crashes (160/160 passed on run 4; unrelatedcoherent_buffer_sanitizes_console_flags_and_stateVirtualFreeflake observed on runs 1–3, 5).Regression run
main:
PR:
Not tested
AI use
0x5EED_0000leak intoSYNC_GRAPH.title_fences, implemented the test-only fix, ran the 10× parallel verification and smoke run, and drafted this description.