HLE: allow oleaut32.dll in default host policy #2063

Open
fuzeofficlal wants to merge 1 commit from upstream-pr/2065 into main
fuzeofficlal commented 2026-11-25 04:20:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T04:20:08Z.


Closes #811.

Summary

  • Add "oleaut32.dll" alongside "ole32.dll" in HostPolicy::default() as a standalone change so vccorlib140.dll's OLEAUT32.dll ordinal imports (#4 SysAllocStringLen, #6 SysFreeString, etc.) bind to the local system DLL via LOAD_LIBRARY_SEARCH_SYSTEM32.

Testing

  • Added default_policy_allows_oleaut32 and Windows host resolution test oleaut32_bstr_ordinals_resolve_to_host verifying ordinals 4 and 6 resolve to SysAllocStringLen and SysFreeString with Provenance::Host.
  • cargo test -p victory-hle, cargo clippy --workspace --all-targets -- -D warnings, and cargo xtask policy.
<!-- greyfinch-sync:Marvisak/VIctory:issue:5485106339 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2065). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T04:20:08Z. --- Closes #811. ### Summary - Add `"oleaut32.dll"` alongside `"ole32.dll"` in `HostPolicy::default()` as a standalone change so `vccorlib140.dll`'s `OLEAUT32.dll` ordinal imports (`#4` `SysAllocStringLen`, `#6` `SysFreeString`, etc.) bind to the local system DLL via `LOAD_LIBRARY_SEARCH_SYSTEM32`. ### Testing - Added `default_policy_allows_oleaut32` and Windows host resolution test `oleaut32_bstr_ordinals_resolve_to_host` verifying ordinals `4` and `6` resolve to `SysAllocStringLen` and `SysFreeString` with `Provenance::Host`. - `cargo test -p victory-hle`, `cargo clippy --workspace --all-targets -- -D warnings`, and `cargo xtask policy`.
catminou4 commented 2026-11-25 04:26:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:26:27Z.

Review: COMMENTED


Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

oleaut32.dll allowed in the default host policy — widens the default DLL surface; check it's needed by a shipping title path, not just convenience.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051850807 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2065#pullrequestreview-6051850807). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T04:26:27Z. **Review:** COMMENTED --- Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff. oleaut32.dll allowed in the default host policy — widens the default DLL surface; check it's needed by a shipping title path, not just convenience.
jeremygold02 commented 2026-11-25 05:06:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T04:22:58Z.


Triage verdict — Keep this focused fix for #811 and reconcile the matching hunk in #216 (af442f8)

Evidence

  • @fuzeofficlal and @wbkepler add the same default oleaut32.dll allowlist entry. Both check that ordinals 4 and 6 resolve to the named BSTR functions and count as host imports, as reported by @UNYTIX in #811. This PR additionally checks case-insensitive matching and strict-policy exclusion. Focused change and tests · #216 policy entry · #216 tests

Checks and limits

  • Compared both patches and their test assertions against current main. The Windows ordinal test result in the PR description is author-reported for this pass.

Next step

  • If maintainers land this standalone change first, drop the repeated allowlist hunk and equivalent ordinal test when rebasing #216. Preserve its distinct crash-handler, PE, TLS, and forwarder work, along with credit for both implementations.

This verification was AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152791843 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2065#issuecomment-7152791843). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T04:22:58Z. --- **Triage verdict — Keep this focused fix for #811 and reconcile the matching hunk in #216** (`af442f8`) **Evidence** - @fuzeofficlal and @wbkepler add the same default `oleaut32.dll` allowlist entry. Both check that ordinals 4 and 6 resolve to the named BSTR functions and count as host imports, as reported by @UNYTIX in #811. This PR additionally checks case-insensitive matching and strict-policy exclusion. [Focused change and tests](https://github.com/Marvisak/VIctory/blob/af442f86a8a70ae17a37699bf3b6ccbc27e9a401/crates/victory-hle/src/host.rs#L239-L283) · [#216 policy entry](https://github.com/Marvisak/VIctory/blob/58e267e23054c1918cc1d04ae1c9c57c190a4a2f/crates/victory-hle/src/host.rs#L41-L48) · [#216 tests](https://github.com/Marvisak/VIctory/blob/58e267e23054c1918cc1d04ae1c9c57c190a4a2f/crates/victory-hle/src/lib.rs#L110-L130) **Checks and limits** - Compared both patches and their test assertions against current `main`. The Windows ordinal test result in the PR description is author-reported for this pass. **Next step** - If maintainers land this standalone change first, drop the repeated allowlist hunk and equivalent ordinal test when rebasing #216. Preserve its distinct crash-handler, PE, TLS, and forwarder work, along with credit for both implementations. This verification was AI-assisted.
Marvisak commented 2026-11-25 11:05:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:23:59Z.


Automated triage for the maintainers.

Looks mergeable. It adds oleaut32.dll to HostPolicy::default() in victory-hle/src/host.rs, next to ole32.dll. That binds the two BSTR ordinals (#4 SysAllocStringLen, #6 SysFreeString) that vccorlib140.dll imports, which are the last unresolved imports reported in #811. Strict mode (HostPolicy::none) is unaffected. The tests check case-insensitive matching and host provenance for both ordinals. CI is passing.

The same hunk is also in the larger #216 (which needs a rebase). If this lands first, #216 should drop it.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159640263 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2065#issuecomment-7159640263). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T10:23:59Z. --- <!-- victory-triage v1 head=af442f86a8a70ae17a37699bf3b6ccbc27e9a401 verdict=merge-candidate at=2026-11-25T10:23:46Z --> Automated triage for the maintainers. Looks mergeable. It adds `oleaut32.dll` to `HostPolicy::default()` in `victory-hle/src/host.rs`, next to `ole32.dll`. That binds the two BSTR ordinals (#4 `SysAllocStringLen`, #6 `SysFreeString`) that `vccorlib140.dll` imports, which are the last unresolved imports reported in #811. Strict mode (`HostPolicy::none`) is unaffected. The tests check case-insensitive matching and host provenance for both ordinals. CI is passing. The same hunk is also in the larger #216 (which needs a rebase). If this lands first, #216 should drop it. --- _Generated by [Claude Code](https://claude.ai/code)_
cloph-dsp commented 2026-11-27 13:32:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T13:32:19Z.


Independent local verification of PR #2065 (HLE: allow oleaut32.dll in default host policy).

  • Windows, Rust 1.100.0/MSVC, cargo test --locked, CARGO_BUILD_JOBS=2, per-worktree CARGO_TARGET_DIR=D:\Victory-Contrib\target-2065-watch.
  • Head af442f86a8a70ae17a37699bf3b6ccbc27e9a401, merge base 940d32f69b22265690a0b5a15d6ded572ba33baf.
  • Command: cargo test --locked -p victory-hle --lib -- --exact host::tests::default_policy_allows_oleaut32 --test-threads=1 --quiet
  • Result: 1 passed, 0 failed, 144 filtered, exit 0.
  • Negative control: git grep -F -c 'host::tests::default_policy_allows_oleaut32' 940d32f -- crates/victory-hle/src → 0 hits (exit 1).
  • git diff --check 940d32f HEAD clean (exit 0).

Only the named synthetic policy test was replayed; no real title or host-library call was exercised. GPU/driver: N/A for this CPU-only HLE test. AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt used.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7219607397 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2065#issuecomment-7219607397). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-27T13:32:19Z. --- Independent local verification of PR #2065 (HLE: allow oleaut32.dll in default host policy). - Windows, Rust 1.100.0/MSVC, `cargo test --locked`, `CARGO_BUILD_JOBS=2`, per-worktree `CARGO_TARGET_DIR=D:\Victory-Contrib\target-2065-watch`. - Head `af442f86a8a70ae17a37699bf3b6ccbc27e9a401`, merge base `940d32f69b22265690a0b5a15d6ded572ba33baf`. - Command: `cargo test --locked -p victory-hle --lib -- --exact host::tests::default_policy_allows_oleaut32 --test-threads=1 --quiet` - Result: 1 passed, 0 failed, 144 filtered, exit 0. - Negative control: `git grep -F -c 'host::tests::default_policy_allows_oleaut32' 940d32f -- crates/victory-hle/src` → 0 hits (exit 1). - `git diff --check 940d32f HEAD` clean (exit 0). Only the named synthetic policy test was replayed; no real title or host-library call was exercised. GPU/driver: N/A for this CPU-only HLE test. AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt used.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2065:upstream-pr/2065'
git switch 'upstream-pr/2065'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/2065'
git switch 'upstream-pr/2065'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2065'
git switch 'upstream-pr/2065'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2065'
git switch 'main'
git merge --squash 'upstream-pr/2065'
git switch 'main'
git merge --ff-only 'upstream-pr/2065'
git switch 'main'
git merge 'upstream-pr/2065'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2063
No description provided.