acphal: roll back partial shape-context allocations and expand tests #1503
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1510"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T13:22:56Z.
Summary
AcpHalAllocateShapeContextsinsrc/startup_stubs/acphal.cppto roll back any allocated XMA shape-context block viaheap_giveand zeroarrays[4]/apu[4]on partial failure (e.g., whencounts[4] != 0succeeds and a later index such ascounts[5] != 0returnsE_NOTIMPL).x2w_local::writable) inAcpHalAllocateShapeContextsandAcpHalCreate, and guard 32-bit APU address conversion against overflow.tests/startup_acphal_apu_free.cppwith positive and negative-control checks forAcpHalAllocateShapeContexts(happy path, partial-failure rollback proving the APU heap block is returned and reusable, earlyE_NOTIMPL, null/read-only/OOM),AcpHalCreate(null/read-only and stand-in vtable calls),ApuIsVirtualAddressValid,ApuMapApuAddress,ApuMapVirtualAddress(including heap boundary negative controls), and non-permissive default traps (includingAcpHalReleaseShapeContexts).docs/startup-runtime.mdto document the rollback and expanded test coverage.Verification
git diff --check origin/main...HEADpython3 -B tests/docs_links_check.pypython3 -B tests/bidi_controls_check.pyctest --preset dev --no-tests=error -R '^(startup_acphal_apu_free|startup_stubs)$' -Vctest --preset release --no-tests=error -R '^(startup_acphal_apu_free|startup_stubs)$' -VAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T13:37:35Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
0103dd53939814542ba80a4d2a2c76f3a87272d9:--preset dev):cmake --build --preset dev --target d3d12_xs_shim startup_acphal_apu_free startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xmem_shim -- -j 6):3.99s(configure1.79s)ctest --preset dev -R '^(startup_acphal_apu_free|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (0.55s:startup_acphal_apu_free0.22s,startup_stubs0.48s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_shim startup_acphal_apu_free startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xmem_shim -- -j 6):1.79s(configure1.94s)ctest --preset release -R '^(startup_acphal_apu_free|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (0.60s:startup_acphal_apu_free0.10s,startup_stubs0.52s)sccache: 9/11 hits; wall17.1sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T13:37:47Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
0103dd5ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.