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

Open
github-bot wants to merge 1 commit from github-bot/gh-2065 into main AGit
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 04:20 UTC · original
fuzeofficlal:fix/hle-allow-oleaut32-811 → main · +42 −0 · 1 files · 1 commits · open

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.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 04:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2065) `fuzeofficlal:fix/hle-allow-oleaut32-811` → `main` · +42 −0 · 1 files · 1 commits · open 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`.
vccorlib140.dll imports OLEAUT32 ordinals #4 (SysAllocStringLen) and
#6 (SysFreeString), which match the host System32 exports.

Closes #811.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:53:42 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 04:22 UTC · original

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.

**@⁠jeremygold02** on GitHub · 2026-11-25 04:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/2065#issuecomment-7152791843) **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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 10:23 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 10:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2065#issuecomment-7159640263) <!-- 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)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2065/head:github-bot/gh-2065'
git switch 'github-bot/gh-2065'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2065'
git switch 'github-bot/gh-2065'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2065'
git switch 'github-bot/gh-2065'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2065'
git switch 'main'
git merge --squash 'github-bot/gh-2065'
git switch 'main'
git merge --ff-only 'github-bot/gh-2065'
git switch 'main'
git merge 'github-bot/gh-2065'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!2065
No description provided.