HLE: match rpcrt4 UuidFromString nil-UUID and canonical string rules #1973
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1975"
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 Marvisak/VIctory. Originally posted by mgunes1311-lab on 2026-11-25T02:10:43Z.
Summary
UuidFromStringA/UuidFromStringWnull-string nil UUID: Inrpcrt4.dll, passingNULLasStringUuidis documented to write the nil UUID (00000000-0000-0000-0000-000000000000) and returnRPC_S_OK(0). Our HLE previously rejected a null string pointer withRPC_S_INVALID_STRING_UUID(1705).8-4-4-4-12grammar: Unlikeole32'sCLSIDFromString,rpcrt4'sUuidFromStringAandUuidFromStringWaccept only the exact 36-characterxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxtext form (lower or upper case).parsepreviously accepted{...}braces, unmatched{or}, arbitrary trailing characters after}, and missing or misplaced dashes, whileUuidFromStringWscanned the entire input into a heapVecbefore parsing.UuidToStringA/UuidToStringWallocation check: ReturnRPC_S_OUT_OF_MEMORY(14) ifallocatereturns null instead of writing a null pointer and returningRPC_S_OK.Verification
cargo test -p victory-hle --target x86_64-pc-windows-msvc --locked(including a Windows differential test comparingUuidFromStringAandUuidFromStringWdirectly againstSystem32\rpcrt4.dllacross null, valid, braced, malformed-dash, whitespace, and trailing-garbage inputs)cargo clippy --workspace --all-targets --all-features --target x86_64-pc-windows-msvc --locked -- -D warningscargo doc --workspace --no-deps --target x86_64-pc-windows-msvc --lockedcargo run -p xtask --target x86_64-pc-windows-msvc --locked -- policy --stagedImported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:48:46Z.
Review: COMMENTED
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
rpcrt4 UuidFromString nil-UUID + canonical string rules — small but exact RPC runtime conformance fix; good.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-25T02:17:16Z.
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-25T02:31:43Z.
Tested
72a7ec1merged ontomain940d32f(clean), Windows 11 build 26300, hostrpcrt4.dll10.0.26100.1, Rust 1.98.1 MSVC.uuid_from_string_matches_the_host_runtimepasses here, as do the other 5rpcrt4tests.main's differences. With only this PR's test module onmain'srpcrt4.rs, 3 of 6 fail:uuid_from_string_matches_the_host_runtime:maingives(1705, <untouched>)where the host DLL gives(0, nil UUID), for the null string.garbage_is_refused:mainparses"{1234abcd-00ef-4a5b-8012-3456789abcde}", which the host refuses.uuid_from_string_writes_what_it_reads:1705instead of0.cargo test -p victory-hle --lib --locked5 runs,144 passedeach.cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.One thing for whoever merges it: this makes the parser stricter, so a caller that passed braced text and relied on the old leniency now gets
RPC_S_INVALID_STRING_UUID, as it would from the real DLL. I didn't check whether the title callsUuidFromStringwith braces; it isn't among the calls I see in the boot and menu logs here.AI use: Claude Code (Claude Opus 5.5) ran these checks and wrote this; the results are from the runs described.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T08:23:17Z.
Automated triage for the maintainers.
Merge candidate.
This changes
UuidFromStringA/UuidFromStringWincrates/victory-hle/src/modules/rpcrt4.rsso a null string writes the nil UUID and returnsRPC_S_OK. That is the documented behaviour of the host function. It also narrowsparseto the exact 36-character8-4-4-4-12form with no braces and no trailing characters, and makesUuidToStringA/WreturnRPC_S_OUT_OF_MEMORYwhenallocatereturns null. Before this change they wrote a null pointer and returned OK.The evidence is a new Windows-only differential test against the host
rpcrt4.dll. A contributor reports it passing on build 26100, and also reports that the same tests fail onmain's parser. I checked the newparseloop: dashes at positions 8/13/18/23, 32 hex digits, nothing after. I also checked themap_whileNUL scanning, which no longer copies the wide string into aVec, and the null checks.One thing to note: braced input is now refused, as the host DLL refuses it. Any title path that depended on the old leniency would now get
RPC_S_INVALID_STRING_UUID.CI:
checkpassing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:37:14Z.
Code review and Windows 11 native
rpcrt4.dllparity verification at head72a7ec1f1e62merged cleanly ontomain(63bcca43c6a0):crates/victory-hle/src/modules/rpcrt4.rs:84-137, 219-247, 469-528):UuidFromStringA/Wreject nulluuid(INVALID_STRING_UUID), write the nil UUID withOKwhentext.is_null(), preserve*uuidon parse failure, and enforce the exact 36-char canonicalxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxgrammar (rejecting braces, spaces, missing/misplaced hyphens, and trailing characters), verified directly against hostrpcrt4.dllinuuid_from_string_matches_the_host_runtime. Also cleanly addsOUT_OF_MEMORYchecks on nullallocateinUuidToStringA/W.cargo xtask policy:191 files ok;cargo clippy --locked -p victory-hle --tests -- -D warnings: 0 warningscargo test --locked -p victory-hle -- --test-threads=1: 155/155 passed (153 lib +fidelityfx+no_dll_planting).LGTM.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T05:50:42Z.
Independent Windows verification of PR #1975 (
rpcrt4: UuidFromString matches the host runtime).CARGO_TARGET_DIR(D:\Victory-Contrib\target-1975-watch),CARGO_BUILD_JOBS=2.72a7ec1f1e629b91745b49baa6849cc16f7d165d, merge base940d32f.cargo test --locked -p victory-hle --lib -- modules::rpcrt4::tests::uuid_from_string_matches_the_host_runtime --exact --test-threads=1 --quiet->1 passed; 0 failed; 143 filtered.git grep -Ffor the new test name on940d32freturned no hits (test absent on base).git diff --check 940d32f HEADexit 0 (clean).#[cfg(windows)]and compares against the host runtime on this Windows machine; other OS paths and the full crate suite were not exercised. This PR already carries other verification reports; this is an additional direct-Windows/MSVC data point.fetch_updatedeprecation warnings.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.