HLE: OLEAUT32 ordinals 4/6 (imported by vccorlib140.dll) have no binding #811

Open
opened 2026-11-26 04:14:00 +00:00 by github-bot · 7 comments
Owner

@⁠UNYTIX on GitHub · 2026-11-24 11:28 UTC · original

victory census reports 74 unresolved imports on 1.0.2.1. 72 of them are exports of the
title's own DLLs (libHttpClient.GDK 38, Bink2Scarlett 23, XboxBvhBuilder 7,
amd_fidelityfx_loader_xbox 4) that the loader binds as title imports, so they are not
gaps. The remaining two are the only real ones:

OLEAUT32.dll!#4   = SysAllocStringLen
OLEAUT32.dll!#6   = SysFreeString

Both are imported by vccorlib140.dll, the C++/CX runtime. Nothing on the boot/menu path
reaches them: no image in the package imports vccorlib140.dll (static or delay import),
and none of three WARP runs (~6 min, menus rendering) logs it being mapped or loaded.

Ordinal 4/6 are the standard BSTR pair (Wine's oleaut32.spec and the export table of
C:\Windows\System32\oleaut32.dll agree), and GetProcAddress by ordinal 4 and 6 returns
addresses on the host, so a HostPolicy entry for oleaut32.dll would bind them without a
shim. Worth doing when something starts loading vccorlib140.dll: an unresolved import is a
trap stub by default, so the first SysFreeString would abort the process with a crash-log
entry naming it.

**@⁠UNYTIX** on GitHub · 2026-11-24 11:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/811) `victory census` reports 74 unresolved imports on 1.0.2.1. 72 of them are exports of the title's own DLLs (libHttpClient.GDK 38, Bink2Scarlett 23, XboxBvhBuilder 7, amd_fidelityfx_loader_xbox 4) that the loader binds as `title` imports, so they are not gaps. The remaining two are the only real ones: OLEAUT32.dll!#4 = SysAllocStringLen OLEAUT32.dll!#6 = SysFreeString Both are imported by `vccorlib140.dll`, the C++/CX runtime. Nothing on the boot/menu path reaches them: no image in the package imports `vccorlib140.dll` (static or delay import), and none of three WARP runs (~6 min, menus rendering) logs it being mapped or loaded. Ordinal 4/6 are the standard BSTR pair (Wine's `oleaut32.spec` and the export table of `C:\Windows\System32\oleaut32.dll` agree), and `GetProcAddress` by ordinal 4 and 6 returns addresses on the host, so a `HostPolicy` entry for `oleaut32.dll` would bind them without a shim. Worth doing when something starts loading vccorlib140.dll: an unresolved import is a trap stub by default, so the first `SysFreeString` would abort the process with a crash-log entry naming it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:00 +00:00
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 12:00 UTC · original

Claiming this issue.

In crates/victory-hle/src/host.rs, HostPolicy::default() already permits companion COM/runtime DLLs like ole32.dll and msvcp_win.dll. Furthermore, imp::resolve already implements ordinal resolution via GetProcAddress(module, ordinal as _).

Adding "oleaut32.dll" to HostPolicy::default() cleanly satisfies ordinal #4 (SysAllocStringLen) and ordinal #6 (SysFreeString) on host without requiring trap stubs or shims.

Preparing a clean, verified branch with unit tests on a fork.

**@⁠pushkarreddyy** on GitHub · 2026-11-24 12:00 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7130833548) Claiming this issue. In `crates/victory-hle/src/host.rs`, `HostPolicy::default()` already permits companion COM/runtime DLLs like `ole32.dll` and `msvcp_win.dll`. Furthermore, `imp::resolve` already implements ordinal resolution via `GetProcAddress(module, ordinal as _)`. Adding `"oleaut32.dll"` to `HostPolicy::default()` cleanly satisfies ordinal #4 (`SysAllocStringLen`) and ordinal #6 (`SysFreeString`) on host without requiring trap stubs or shims. Preparing a clean, verified branch with unit tests on a fork.
Author
Owner

@⁠UNYTIX on GitHub · 2026-11-24 12:10 UTC · original

Fix is pushed and ready on a fork branch (no code change in this repo needed beyond one line):

What it does: adds oleaut32.dll to HostPolicy::default(), plus
host::tests::oleaut32_bstr_ordinals_resolve asserting that ordinals #4 and #6
resolve through the policy to non-null addresses. Census after the change:
995 functions, 130 HLE, 793 host, 72 missing; the oleaut32.dll row is 2
functions, 2 host, 0 missing. cargo test --workspace --locked (343 passed) and
cargo clippy --workspace --all-targets --locked -- -D warnings are clean.

gh pr create from the UNYTIX account is refused by this repository
(CreatePullRequest FORBIDDEN, both GraphQL and REST), so the PR has to be opened
from the compare link above by someone with access.

**@⁠UNYTIX** on GitHub · 2026-11-24 12:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7131073750) Fix is pushed and ready on a fork branch (no code change in this repo needed beyond one line): - Fork: `UNYTIX/VIctory`, branch `fix/oleaut32-host-allowance`, commit `16f59b5` - Diff: https://github.com/UNYTIX/VIctory/commit/16f59b5 - Open a PR: https://github.com/Marvisak/VIctory/compare/main...UNYTIX:fix/oleaut32-host-allowance?expand=1 What it does: adds `oleaut32.dll` to `HostPolicy::default()`, plus `host::tests::oleaut32_bstr_ordinals_resolve` asserting that ordinals `#4` and `#6` resolve through the policy to non-null addresses. Census after the change: 995 functions, 130 HLE, 793 host, **72 missing**; the `oleaut32.dll` row is 2 functions, 2 host, 0 missing. `cargo test --workspace --locked` (343 passed) and `cargo clippy --workspace --all-targets --locked -- -D warnings` are clean. `gh pr create` from the `UNYTIX` account is refused by this repository (`CreatePullRequest` FORBIDDEN, both GraphQL and REST), so the PR has to be opened from the compare link above by someone with access.
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 12:57 UTC · original · edited 2026-11-24 14:22 UTC

Thanks @⁠UNYTIX for the census metrics and independent verification!

The census numbers (995 functions: 130 HLE, 793 host, 72 missing; oleaut32.dll row: 2 functions, 2 host, 0 missing) clearly show that adding oleaut32.dll to HostPolicy::default() cleanly closes out both missing ordinals (#4 and #6) without code regression.

Both fork branches (pushkarreddyy:fix/host-policy-oleaut32 and UNYTIX:fix/oleaut32-host-allowance) are identical in behavior and test coverage—either is ready for @⁠Marvisak to review or merge when convenient!

**@⁠pushkarreddyy** on GitHub · 2026-11-24 12:57 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7132151252) · edited 2026-11-24 14:22 UTC Thanks @⁠UNYTIX for the census metrics and independent verification! The census numbers (995 functions: 130 HLE, 793 host, 72 missing; `oleaut32.dll` row: 2 functions, 2 host, 0 missing) clearly show that adding `oleaut32.dll` to `HostPolicy::default()` cleanly closes out both missing ordinals (#4 and #6) without code regression. Both fork branches (`pushkarreddyy:fix/host-policy-oleaut32` and `UNYTIX:fix/oleaut32-host-allowance`) are identical in behavior and test coverage—either is ready for @⁠Marvisak to review or merge when convenient!
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 12:03 UTC · original · edited 2026-11-24 14:22 UTC

Verified Fix Ready on Fork

As upstream pull request creation is currently restricted to collaborators, the complete tested fix is available on my fork:

Changes (crates/victory-hle/src/host.rs):

  • Added "oleaut32.dll" to HostPolicy::default().
  • Added unit tests:
    • default_policy_allows_oleaut32 verifying case-insensitive DLL matching.
    • default_policy_resolves_oleaut32_bstr_ordinals asserting that ordinal #4 (SysAllocStringLen) and ordinal #6 (SysFreeString) resolve cleanly on Windows hosts.

Verification:

  • Formatted with rustfmt --edition 2024.
  • Zero proprietary game assets or binaries (Rule #1 compliant).
  • ready for review or merge when PR permissions reopen.
**@⁠pushkarreddyy** on GitHub · 2026-11-24 12:03 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7130909962) · edited 2026-11-24 14:22 UTC ### Verified Fix Ready on Fork As upstream pull request creation is currently restricted to collaborators, the complete tested fix is available on my fork: - **Branch:** https://github.com/pushkarreddyy/VIctory/tree/fix/host-policy-oleaut32 - **Commit:** [`034521f`](https://github.com/pushkarreddyy/VIctory/commit/034521f) based on `main` (`ffe310e`) #### Changes (`crates/victory-hle/src/host.rs`): - Added `"oleaut32.dll"` to `HostPolicy::default()`. - Added unit tests: - `default_policy_allows_oleaut32` verifying case-insensitive DLL matching. - `default_policy_resolves_oleaut32_bstr_ordinals` asserting that ordinal #4 (`SysAllocStringLen`) and ordinal #6 (`SysFreeString`) resolve cleanly on Windows hosts. #### Verification: - Formatted with `rustfmt --edition 2024`. - Zero proprietary game assets or binaries (Rule #1 compliant). - ready for review or merge when PR permissions reopen.
Author
Owner

@⁠superboynick on GitHub · 2026-11-24 17:01 UTC · original

Independent confirmation, on a runtime we built here from source: a different machine, a different copy of the package, our own victory.exe — main @ ffe310eb2098 (commit prefix), rustc 1.98.1 as pinned by rust-toolchain.toml, MSVC 14.44.35207. The image it was pointed at is blake3 b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93, entry rva 0x56a1ec8, 587 imports.

victory census reproduces the table in #811 item for item: TOTAL 995 funcs / 130 hle / 791 host / 74 missing, the 74 splitting as libhttpclient.gdk 38, bink2scarlett 23, xboxbvhbuilder 7, amd_fidelityfx_loader_xbox 4, oleaut32 2.

Then one layer below the aggregate. victory run, invoked without --execute, reaches the binding stage and prints:

bound  GTA6.exe: 88 hle, 427 host, 72 title, 0 missing
TLS    index=10 patched=53246
not executing (pass --execute to start the title)

The 72 is not a new count — it is the 38+23+7+4 that census still files under missing, now bound into the title column, and 88+427+72 = 587, exactly the import count inspect reports for this image. So at binding time the deficit is 0, and the class of those 72 is settled by resolution rather than by arithmetic: census aggregates statically over the images, binding actually resolves each import and lands it at an address. An earlier report from another machine printed the same two binding totals and the same TLS count, with nothing in the title column and all 72 in missing — which leaves the whole difference between the two reports in classification, not in coverage.

Boundary: no --execute, so the title was never started. No gameplay, no frame data, nothing about how far it gets; the run's own last line says exactly that.

Still curious whether census is meant to keep title-DLL exports in missing (#838 raised this); is 74 the intended raw number, or should it fall to the two OLEAUT32 ordinals?

AI-assisted. No game data used.

**@⁠superboynick** on GitHub · 2026-11-24 17:01 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7138567932) Independent confirmation, on a runtime we built here from source: a different machine, a different copy of the package, our own `victory.exe` — `main` @ `ffe310eb2098` (commit prefix), rustc 1.98.1 as pinned by `rust-toolchain.toml`, MSVC 14.44.35207. The image it was pointed at is blake3 `b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93`, entry rva `0x56a1ec8`, 587 imports. `victory census` reproduces the table in #811 item for item: TOTAL 995 funcs / 130 hle / 791 host / 74 missing, the 74 splitting as libhttpclient.gdk 38, bink2scarlett 23, xboxbvhbuilder 7, amd_fidelityfx_loader_xbox 4, oleaut32 2. Then one layer below the aggregate. `victory run`, invoked without `--execute`, reaches the binding stage and prints: ``` bound GTA6.exe: 88 hle, 427 host, 72 title, 0 missing TLS index=10 patched=53246 not executing (pass --execute to start the title) ``` The 72 is not a new count — it is the 38+23+7+4 that census still files under missing, now bound into the `title` column, and 88+427+72 = 587, exactly the import count `inspect` reports for this image. So at binding time the deficit is 0, and the class of those 72 is settled by resolution rather than by arithmetic: census aggregates statically over the images, binding actually resolves each import and lands it at an address. An earlier report from another machine printed the same two binding totals and the same TLS count, with nothing in the title column and all 72 in missing — which leaves the whole difference between the two reports in classification, not in coverage. Boundary: no `--execute`, so the title was never started. No gameplay, no frame data, nothing about how far it gets; the run's own last line says exactly that. Still curious whether `census` is meant to keep title-DLL exports in `missing` (#838 raised this); is 74 the intended raw number, or should it fall to the two OLEAUT32 ordinals? AI-assisted. No game data used.
Author
Owner

@⁠superboynick on GitHub · 2026-11-24 18:07 UTC · original

Follow-up to my comment above, same thread — a controlled experiment rather than a new topic. Same build, same package, one variable: which DLLs sit beside the exe.

A — package DLLs in place: 4 title dll lines, then bound GTA6.exe: 88 hle, 427 host, 72 title, 0 missing.
B — the four title DLLs moved away (XboxBvhBuilder, amd_fidelityfx_loader_xbox, libHttpClient.GDK, Bink2Scarlett): 0 title dll lines, then 88 hle, 427 host, 0 title, 72 missing.
C — every DLL moved away: output identical to B, same 5403 bytes, sha256 0fed33d0671015a0c082c100c64123c6c628418249efc5c4c9b1376fc4524d56.

88 hle and 427 host hold in all three. The 72 that change column are the four counts from the issue body, unchanged: libHttpClient.GDK 38, Bink2Scarlett 23, XboxBvhBuilder 7, amd_fidelityfx_loader_xbox 4. So the presence of those four files beside the exe is what decides title versus missing, and C rules the remaining DLLs out of the picture entirely.

Mechanism the output supports: with no title DLL present, the loader substitutes nothing — no HLE stand-in, no host binding — and those imports drop straight to missing. What was inferred from the counts above is now measured.

Triage rule that follows: any report showing 72 missing on this build starts with a directory listing — are those four files beside the exe? #930 reports the same shape on the same commit, with only the exe in its directory.

Boundary: no --execute in any of the three runs; the title never started, so there is nothing from inside it and no frame data.

AI-assisted. No game data used.

**@⁠superboynick** on GitHub · 2026-11-24 18:07 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7140199098) Follow-up to my comment above, same thread — a controlled experiment rather than a new topic. Same build, same package, one variable: which DLLs sit beside the exe. `A` — package DLLs in place: 4 `title dll` lines, then `bound GTA6.exe: 88 hle, 427 host, 72 title, 0 missing`. `B` — the four title DLLs moved away (XboxBvhBuilder, amd_fidelityfx_loader_xbox, libHttpClient.GDK, Bink2Scarlett): 0 `title dll` lines, then `88 hle, 427 host, 0 title, 72 missing`. `C` — every DLL moved away: output identical to B, same 5403 bytes, sha256 `0fed33d0671015a0c082c100c64123c6c628418249efc5c4c9b1376fc4524d56`. `88 hle` and `427 host` hold in all three. The 72 that change column are the four counts from the issue body, unchanged: libHttpClient.GDK 38, Bink2Scarlett 23, XboxBvhBuilder 7, amd_fidelityfx_loader_xbox 4. So the presence of those four files beside the exe is what decides `title` versus `missing`, and C rules the remaining DLLs out of the picture entirely. Mechanism the output supports: with no title DLL present, the loader substitutes nothing — no HLE stand-in, no host binding — and those imports drop straight to `missing`. What was inferred from the counts above is now measured. Triage rule that follows: any report showing `72 missing` on this build starts with a directory listing — are those four files beside the exe? #930 reports the same shape on the same commit, with only the exe in its directory. Boundary: no `--execute` in any of the three runs; the title never started, so there is nothing from inside it and no frame data. AI-assisted. No game data used.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:54 UTC · original

Automated triage for the maintainers.

Confirmed on main: HostPolicy::default() in crates/victory-hle/src/host.rs lists ole32.dll but not oleaut32.dll, so ordinals 4 and 6 are unresolved. As the report says, the only importer is vccorlib140.dll, which nothing has been seen to load, so there is no runtime impact yet.

Open PR #216 allows oleaut32.dll along with unrelated changes. Pull requests are open to everyone, so please open the one-line fork change as its own PR. Whether census should list title-DLL exports as missing is the separate question in #838.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/811#issuecomment-7152348810) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-24T18:07:47Z at=2026-11-25T03:54:22Z --> Automated triage for the maintainers. Confirmed on `main`: `HostPolicy::default()` in `crates/victory-hle/src/host.rs` lists `ole32.dll` but not `oleaut32.dll`, so ordinals 4 and 6 are unresolved. As the report says, the only importer is `vccorlib140.dll`, which nothing has been seen to load, so there is no runtime impact yet. Open PR #216 allows `oleaut32.dll` along with unrelated changes. Pull requests are open to everyone, so please open the one-line fork change as its own PR. Whether `census` should list title-DLL exports as missing is the separate question in #838. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#811
No description provided.