startup: report pending results for an empty XApu queue #1967
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1967
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1967/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?
@avt0m4t48 on GitHub · 2026-11-24 22:16 UTC · original
avt0m4t48:fix/startup-xapu-empty-results→main· +18 −10 · 3 files · 1 commits · merged 2026-11-24 22:25 UTCRefs #1887. Return the documented
XAPU_E_PENDING_RESULTS(0x8AC81001) whenXApuDequeueResultfinds no result on a valid connection. The source-built fixture checks that a fresh and a drained queue report that status and preserve a sentinel-filled result buffer. Microsoft XApu error codesBuilt the Windows x64 stand-in and
startup_xapu_queue_checkwith LLVM-MinGW Clang 23.1.6 and ran them under Wine 10.0. The original code failed three status checks. The patch passed the queue lifecycle and strict trap control. A mutation that writes the result buffer on empty failed both sentinel checks. Documentation links, bidi controls andgit diff --checkpassed. The native MSVC reproduction isctest --preset release --no-tests=error -R '^startup_xapu_queue$' -Vafter building the stand-in and fixture.Native MSVC CTest and application audio remain unverified. Source-built inputs only. AI-assisted using Codex.
@ChazY11 on GitHub · 2026-11-24 22:22 UTC · original
I ran the item the description lists as unverified: native MSVC
Windows 11 build 26300.9974, MSVC 19.44,
devpreset — not clang/Wine:(Note for anyone repeating this: the CTest target is
startup_xapu_queue_check, notstartup_xapu_queue— the latter is the testname, and
--target startup_xapu_queuefails withunknown target.)Three mutations, all caught
Each rebuilt into
xapu.dllwith the timestamp checked, then reverted:0x80004005inlinehr_ok(success with no result)The third is the one the description says it added a mutation for, and it is the interesting one: a stand-in that returns the right
status but still writes the caller's buffer is how a "no results" path quietly corrupts a caller's structure. The sentinel-filled
buffer catches it.
The status code is the documented one
0x8AC81001matches theXAPU_E_PENDING_RESULTSrow of the GDK error-code table, and the neighbouring XApu codes in this file(
0x8AC81000area) are consistent with it. ReturningE_FAILfor "no results yet" was the wrong class of status: a caller thatretries on
PENDINGand gives up onE_FAILwould abort a healthy drain.What remains unverified, and it is the same as before
Nothing about a real title: this is a stand-in exercised by a source-built fixture. The trap control firing on
XApuConnectshowsthe shim's permissive gate is still in place, which is the right default for a fixture run.
Verdict
Reviewed. The status code is correct to the documentation, the three behaviours are pinned by mutations, and the MSVC/CTest path
the author could not run passes here.
Notes