HLE: oleaut32 is not in the host pass-through list, so the title's BSTR ordinals do not resolve #2906
No reviewers
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!2906
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2906"
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?
@Jackster on GitHub · 2026-11-25 23:35 UTC · original
Jackster:hle/oleaut32-passthrough→main· +24 −0 · 2 files · 1 commits · openHostPolicy::default()allowsole32.dllbut notoleaut32.dll, and the host lookup is gated on that list, so everyoleaut32.dllimport fell through to the unimplemented-import stub. A title imports two of them by ordinal, whichvictory census <dump> --missingreported as unresolved:They are
SysAllocStringLen(#4) andSysFreeString(#6).dumpbin /exportson the host's ownoleaut32.dllconfirms the ordinals:Allocating and freeing a BSTR does not differ between the console and the host, exactly like the
ole32.dllcalls already allowed next to it — the omission looked like an oversight rather than a policy decision.Change
crates/victory-hle/src/host.rs:oleaut32.dlladded to the default allow list, with a comment.crates/victory-hle/src/lib.rs:oleaut32_bstr_ordinals_pass_through_to_host, which classifies ordinals 4 and 6 asProvenance::Hostand checks that an ordinal the DLL does not export still resolves to nothing.No HLE implementations are added: the host's exports answer these, by ordinal, through the existing pass-through.
Verified
On the retail dump used for the report:
cargo test -p victory-hle: 153 passed, 0 failed. Full workspace suite (--exclude victory-core, absent from this checkout only): 0 failures.Claimed in #1633: #1633
AI-assisted (drafted with an AI coding agent); the census runs, the
dumpbincheck and the test runs above are my own. No game data beyond the DLL name and ordinals the census prints.`HostPolicy::default()` allows `ole32.dll` but not `oleaut32.dll`, and the host lookup is gated on that list, so every `oleaut32.dll` import fell through to the unimplemented-import stub. The title imports two of them by ordinal, which `victory census <dump> --missing` reported as unresolved: oleaut32.dll 2 funcs 0 hle 0 host 2 missing They are `SysAllocStringLen` (#4) and `SysFreeString` (#6), whose ordinals `dumpbin /exports` confirms on the host's own oleaut32.dll: allocating and freeing a BSTR is the same on both, like the `ole32.dll` calls next to them. Add `oleaut32.dll` to the policy, with a test that the two ordinals classify as host and that an ordinal the DLL does not export still resolves to nothing. On the retail dump used for the report, the census now reads oleaut32.dll 2 funcs 0 hle 2 host 0 missing and the missing count over the whole dump goes from 74 to 72. Full workspace suite green (0 failures); the `victory-core` crate is excluded only because `victory.example.toml` is absent from this checkout.@fuzeofficlal on GitHub · 2026-11-25 23:38 UTC · original
Heads-up on overlap:
#2065(currentlytriage: merge candidatefor#811) already adds"oleaut32.dll"toHostPolicy::default()incrates/victory-hle/src/host.rsalongsideole32.dlland tests ordinal#4(SysAllocStringLen) and#6(SysFreeString) resolution.Nice addition here testing
resolve_importthroughcrates/victory-hle/src/lib.rsas well — leaving this cross-reference so maintainers can pick whichever they prefer.@Kajanos on GitHub · 2026-11-26 00:07 UTC · original
Windows 11 / NVIDIA test run, head
c42ee14369merged ontomain63bcca43c6.Setup: Windows 11 Home build 26300, RTX 5080, NVIDIA 621.40, rustc 1.98.1 MSVC, VS 2022 Build Tools, Windows SDK 10.0.26100 (
dxil.dllfrom the SDK).cargo test --locked -p victory-hle: 152 passed, 1 failed.lifecycle::tests::showing_a_title_window_shows_its_stand_in, and it also fails onmainin this run. The tests ran over SSH, i.e. in session 0 with no interactive desktop, so the window can't be shown. On the desktop session the same test passes onmain(12/12lifecycle). This PR doesn't touch lifecycle.Not run: the retail title, clippy, and other crates.
AI-assisted (Claude Code)
@Marvisak on GitHub · 2026-11-26 02:18 UTC · original
Automated triage for the maintainers.
Proposed close: duplicate of #2065. #2065 makes the same change, adding
"oleaut32.dll"toHostPolicy::default()incrates/victory-hle/src/host.rs. It merges cleanly, is already marked as a merge candidate, and tests ordinals 4 and 6 resolving to the host. The extraclassifytest here could be offered on #2065 instead.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
@kotekompotek on GitHub · 2026-11-25 23:38 UTC · original · reviewed
Verified: BSTR helpers are semantically identical host-side, and the test locks in both directions — ordinals 4/6 pass through while a non-existent ordinal resolves to nothing (so classify does real per-DLL ordinal validation, not blind pass-through). LGTM.
@cloph-dsp on GitHub · 2026-11-26 12:29 UTC · original
Independent local verification of head
c42ee14on Windows 11, Rust 1.100.0/MSVC:cargo test --locked -p victory-hle --lib -- tests::oleaut32_bstr_ordinals_pass_through_to_host --exact— 1 passed, 0 failed.git diff --check origin/main HEAD— clean.Used a worktree-local
CARGO_TARGET_DIR. Synthetic ordinal inputs only; no game assets or DRM material used. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only).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.