HLE: reject null out in QueryApiImpl before lookup and add xgameruntime unit tests #1029
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#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?
@geiyiliyabumo on GitHub · 2026-11-24 15:11 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 06:54 UTC · original · edited 2026-11-25 09:58 UTC
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
@StExpeditus on GitHub · 2026-11-25 09:09 UTC · original
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.