HLE: reject null out in QueryApiImpl before lookup and add xgameruntime unit tests #1029
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 geiyiliyabumo on 2026-11-24T15:11:42Z.
Summary
Fixes a real null-argument handling bug in
QueryApiImplincrates/victory-hle/src/modules/xgameruntime.rsand expands deterministic synthetic unit tests from 1 to 14 passing tests.Because external PR creation is currently restricted (
collaborators_only), the CI-green branch is ready on my fork for cherry-pick / review:geiyiliyabumo/VIctory@test/hle-xgameruntimegeiyiliyabumo/VIctory@8466edd(based onmainffe310e)Changes (
crates/victory-hle/src/modules/xgameruntime.rs)QueryApiImplpreviously fell through to the "area not implemented" path when called with a known(provider, iid)and a nulloutpointer (returningERROR_NOT_SUPPORTED, logging a false warning, and memoising the pair inQUERIED). It now returnsE_INVALIDARGupfront before lookup/logging/memoisation.QueryApiImplnullout/unknown/whole-AREAS-table uniqueness,put,put_string,text,token,Guid,Object/Methods/add_ref/missing::<N>, and runtime init/export helpers.Verification (Windows 11 x64 MSVC)
rustfmt --edition 2024 --check crates/victory-hle/src/modules/xgameruntime.rs: PASScargo xtask policy: PASS (154 files ok)cargo clippy -p victory-hle --all-targets --locked -- -D warnings(default +--features diagnostics): PASS (0 warnings)cargo test -p victory-hle --locked -- xgameruntime::: 14 passed, 0 failed (victory-hle107/107PASS)AI-assisted; synthetic tests only, no game files.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:54:52Z.
Automated triage for the maintainers.
Confirmed on
main: inQueryApiImpl(crates/victory-hle/src/modules/xgameruntime.rs), a known (provider, interface) pair with a nulloutskips the success branch and falls through to the "runtime API area not implemented" warning, records the pair inQUERIEDand returnsNOT_SUPPORTED, so a later diagnosis would wrongly list an implemented area as missing. It is minor (the title passes a validout). Open pull request #1199 by the same author carries a fix (it returns early for a nulloutwithout marking the area missing); note it returnsNOT_SUPPORTEDwhere this issue proposesE_INVALIDARG, so the review there should settle which.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:09:08Z.
Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, Rust 1.98.1 MSVC), commit
6ebc0af:cargo test -p victory-hle --locked --no-fail-fast-> 146 passed, 0 failed, 0 ignored. Synthetic tests only, no game files.