Repository navigation
HLE: implement XUser maximum-users slot 0x30 (#348, #622) - #648
LAKSHYA-cmd-tech wants to merge 1 commit into
Conversation
ed491e7 to
572ba01
Compare
572ba01 to
241b08f
Compare
|
Thanks for picking this up! There's an ABI bug in 1. Extra
|
|
Independent Windows check of
The offline XUser fixture confirms the max-users slot reports one supported user. The test invokes the shim with synthetic arguments. Only source-built synthetic fixtures were used. AI-assisted verification. |
|
Automated triage for the maintainers. Closing because another open pull request covers the same change. See #398. Same slot as #398 with a wrong signature: it adds a handle argument the public call does not have, so a real call would write through whatever is in the third argument register. Its crash explanation (the title calling slot 0x30 at account init) is unsupported. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default) - Descriptor sync: a multiply-and-fold fingerprint of a record in place of BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots that draws read through tables lately are left to their draws (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap went from 70-220 ms a frame to about 3. - Write watch: no kernel asking for memory the guards already hold as view memory (pull request Marvisak#670 by Jonirulah). - Card copies' flagged pieces can come down inside their own flights (pull request Marvisak#648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by default). One game run with it on: no device loss, the copy-back thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time gain claimed. - Logging: the heap pass's texture part and buffer slots; indirect compute dispatches over 65,535 groups. - README: what was measured, and that pull request Marvisak#220 with VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in. One five-minute game run of this tree's source on an RTX 4070: no device loss; the frame is still 250 to 380 ms (the card is the limit). This merged tree was built; its test suites were not run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default) - Descriptor sync: a multiply-and-fold fingerprint of a record in place of BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots that draws read through tables lately are left to their draws (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap went from 70-220 ms a frame to about 3. - Write watch: no kernel asking for memory the guards already hold as view memory (pull request Marvisak#670 by Jonirulah). - Card copies' flagged pieces can come down inside their own flights (pull request Marvisak#648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by default). One game run with it on: no device loss, the copy-back thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time gain claimed. - Logging: the heap pass's texture part and buffer slots; indirect compute dispatches over 65,535 groups. - README: what was measured, and that pull request Marvisak#220 with VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in. One five-minute game run of this tree's source on an RTX 4070: no device loss; the frame is still 250 to 380 ms (the card is the limit). This merged tree was built; its test suites were not run.
The pass over descriptor records copied in as bytes took a BLAKE3 hash of every record on a changed page; the fork's author measured 35 to 42 ms a frame over 250,000 to 300,000 records. It now takes a multiply-and-fold fingerprint of the record's words (records are our own; equal records print alike, a changed one otherwise about always, unit-tested bit by bit). Slots that draws read through tables lately are left to their draws, as the passes over slots picked by index leave them: the title writes its per-draw tables into the same heap every frame, and each draw makes what its table shows in a slot of its own. They were most of the records mirrored, each then made and brought up to date once more by the pass over buffer views. VICTORY_HEAP_SYNC_TABLES=1 mirrors them too; the sync's frame line counts them. The fork's author reports the pass over the heap going from 70-220 ms a frame to about 3. Ported from fxceless/victory-fork 9376fd6, these two parts only. Its write-watch part (pull request Marvisak#670: no kernel asking for view memory the guards hold) is ours already (watch::known_view); the in-flight card fetches (pull request Marvisak#648, off by default) and the logging are not taken.
Summary
Fixes the crash at +0xb5a5f8 (read of uninitialized object at offset x68) right after XUserAddAsync during account init (#348, #622, #630).
Root Cause
During account initialization right after XUserAddAsync, the title's auth subsystem calls slot 0x30 (GetMaxUsers) on the user provider interface (IXUserProvider). Previously, slot 0x30 was mapped to missing::<6>, which returned E_NOTIMPL without writing to the caller's output pointer. The title dereferenced the uninitialized pointer, causing an immediate xc0000005 access violation at +0xb5a5f8.
Fix
Verification
ustfmt --edition 2024 --check crates/victory-hle/src/modules/xuser.rs: clean.