PE loader: load system DLLs by path as given and do not cache failures #1142

Merged
emirduran707 merged 1 commit from upstream-pr/1151 into main 2026-11-29 07:59:43 +00:00
emirduran707 commented 2026-11-24 12:34:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T12:34:37Z.


system_module cached host module handles in SYS_CACHE by dll_key, which drops the directory, and it cached failures (0) too. So:

  • after LoadLibrary("C:\Missing\foo.dll") failed, a later LoadLibrary("foo.dll") returned NULL without trying;
  • once version.dll was cached, LoadLibrary("C:\Mods\version.dll") returned the System32 copy.

Windows loads the path it is given.

A name with a directory component is now loaded as given with LoadLibraryW and is not cached. Bare names (import resolution, the HLE modules' system_module("x.dll") calls) still use the name-keyed cache, which now holds only successful loads.

What is in it

  • crates/xcl/src/resolver.rs: the change, and tests failed_system_load_by_path_is_not_cached and system_load_by_path_loads_that_path.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo test --workspace -- --test-threads=4 on 5157a51: 743 passed, 0 failed, 41 ignored; no SKIPPED GPU tests
  • both new tests fail without the change and pass with it
  • under Wine a copy of version.dll is a Wine builtin, which Wine maps to the module already loaded under that name whatever the path; system_load_by_path_loads_that_path checks the load by path only on Windows (found in a test run under Wine, see the comments)

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19650 MB

this PR:

xcl-smoke v1
commit: 5157a51c57a137f9500101d36b09a38e37a9329b
gpu: AMD Radeon RX 9060 XT
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1565 (PresentX 1565)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19669 MB

Not tested

  • A title that loads a DLL by full path: the smoke title's run is a regression check only.
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the problem, wrote the change, the test and this description; I reviewed the diff and ran the tests and smoke runs above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5472243596 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T12:34:37Z. --- `system_module` cached host module handles in `SYS_CACHE` by `dll_key`, which drops the directory, and it cached failures (0) too. So: - after `LoadLibrary("C:\Missing\foo.dll")` failed, a later `LoadLibrary("foo.dll")` returned NULL without trying; - once `version.dll` was cached, `LoadLibrary("C:\Mods\version.dll")` returned the System32 copy. Windows loads the path it is given. A name with a directory component is now loaded as given with `LoadLibraryW` and is not cached. Bare names (import resolution, the HLE modules' `system_module("x.dll")` calls) still use the name-keyed cache, which now holds only successful loads. **What is in it** - `crates/xcl/src/resolver.rs`: the change, and tests `failed_system_load_by_path_is_not_cached` and `system_load_by_path_loads_that_path`. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo test --workspace -- --test-threads=4` on 5157a51: 743 passed, 0 failed, 41 ignored; no SKIPPED GPU tests - both new tests fail without the change and pass with it - under Wine a copy of `version.dll` is a Wine builtin, which Wine maps to the module already loaded under that name whatever the path; `system_load_by_path_loads_that_path` checks the load by path only on Windows (found in a test run under Wine, see the comments) **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19650 MB ``` this PR: ``` xcl-smoke v1 commit: 5157a51c57a137f9500101d36b09a38e37a9329b gpu: AMD Radeon RX 9060 XT title: retail-title seconds: 60 exit: 0x0 frames shown: 1565 (PresentX 1565) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19669 MB ``` **Not tested** - A title that loads a DLL by full path: the smoke title's run is a regression check only. - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the problem, wrote the change, the test and this description; I reviewed the diff and ran the tests and smoke runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DavidM1911 commented 2026-11-24 13:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:49:27Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.

  • cargo test -p xcl --lib resolver: 7 passed, 0 failed — includes the new system_load_by_path_loads_that_path and failed_system_load_by_path_is_not_cached.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7131967494 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1151#issuecomment-7131967494). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:49:27Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug. - `cargo test -p xcl --lib resolver`: **7 passed, 0 failed** — includes the new `system_load_by_path_loads_that_path` and `failed_system_load_by_path_is_not_cached`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
fromthemoonx commented 2026-11-24 13:03:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T12:51:40Z.


Rerun on the new head 5157a51 (system DLLs by path, failures not cached): still passes on the RTX 3060.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, 5157a51 merged onto main b49be18 (clean; resolver.rs auto-merged) 1437 passed, 0 failed, 47 ignored; 25 SKIPPED lines
system_load_by_path_loads_that_path and failed_system_load_by_path_is_not_cached, alone, 30 runs each; resolver:: (8 tests) at --test-threads=8, 30 runs 30 of 30 each; 30 of 30
scratch: the path branch of system_module disabled (if false && dll.contains(…)) system_load_by_path_loads_that_path fails (left != right, the cached System32 handle came back); the other 7 pass

Same machine, debug. The report below is for eecffed.


NVIDIA run with the whole suite, since Not tested lists NVIDIA.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug
  • Exact head eecffede46e7c3bab32a5af70cce6422d2f3d5f2, which is on current main 47efa2e (so also the merged result): cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 743 passed, 0 failed, 41 ignored, the same as yours
  • Both new tests fail without the change, as you say: with resolver.rs as on main plus only the two tests and their module_path helper:
    • failed_system_load_by_path_is_not_cached panics at line 624
    • system_load_by_path_loads_that_path fails its assert_ne! at line 637
    • with the change, both pass
  • resolver:: + loader:: tests, 10 runs: 10 of 10 passed (9 each)
  • e2e, 3 runs: 3 of 3 passed. The test title resolves its imports and loads testgame_mw.dll through this code.
  • D3D12 debug layer: the test title's XCL_D3D12_DEBUG=1 run logs the same set of debug-layer errors and warnings as on main.
  • SKIPPED (no wave64 on this adapter): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested

  • A title that LoadLibrarys a mod DLL by path (none here); release build.

AI use

  • Claude Code (Claude Opus 5.5) ran the build and tests on the machine above, including the check without the change, and wrote this report from the output.
<!-- greyfinch-sync:ivall/xcl:comment:7132018416 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7132018416). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-24T12:51:40Z. --- **Rerun on the new head `5157a51` (system DLLs by path, failures not cached): still passes on the RTX 3060.** | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4`, `5157a51` merged onto `main` `b49be18` (clean; `resolver.rs` auto-merged) | 1437 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines | | `system_load_by_path_loads_that_path` and `failed_system_load_by_path_is_not_cached`, alone, 30 runs each; `resolver::` (8 tests) at `--test-threads=8`, 30 runs | 30 of 30 each; 30 of 30 | | scratch: the path branch of `system_module` disabled (`if false && dll.contains(…)`) | `system_load_by_path_loads_that_path` fails (`left != right`, the cached System32 handle came back); the other 7 pass | Same machine, debug. The report below is for `eecffed`. --- NVIDIA run with the whole suite, since **Not tested** lists NVIDIA. **Tested** - NVIDIA GeForce RTX 3060 12 GB (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug - **Exact head `eecffede46e7c3bab32a5af70cce6422d2f3d5f2`**, which is on current `main` `47efa2e` (so also the merged result): `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **743 passed, 0 failed, 41 ignored**, the same as yours - **Both new tests fail without the change, as you say:** with `resolver.rs` as on `main` plus only the two tests and their `module_path` helper: - `failed_system_load_by_path_is_not_cached` panics at line 624 - `system_load_by_path_loads_that_path` fails its `assert_ne!` at line 637 - with the change, both pass - `resolver::` + `loader::` tests, 10 runs: **10 of 10 passed** (9 each) - `e2e`, 3 runs: **3 of 3 passed**. The test title resolves its imports and loads `testgame_mw.dll` through this code. - D3D12 debug layer: the test title's `XCL_D3D12_DEBUG=1` run logs the same set of debug-layer errors and warnings as on `main`. - SKIPPED (no wave64 on this adapter): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` **Not tested** - A title that `LoadLibrary`s a mod DLL by path (none here); release build. **AI use** - Claude Code (Claude Opus 5.5) ran the build and tests on the machine above, including the check without the change, and wrote this report from the output.
JoaoPauluu commented 2026-11-24 14:06:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T13:32:59Z.


Rerun at 5157a51 under Wine on Linux: all resolver:: tests pass now.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 5157a51 as it is (based on 47efa2e) and main 47efa2e, no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).
  • resolver:: tests on 5157a51: 7 passed, 0 failed, failed_system_load_by_path_is_not_cached and system_load_by_path_loads_that_path included.
  • Earlier, on eecffed: system_load_by_path_loads_that_path failed here at assert_ne!(h, sys) (both 123145285140480). The prefix's version.dll is a Wine builtin (the file has the Wine builtin DLL marker), and Wine gave the System32 handle for the copy's path. With 5157a51 that check is skipped under Wine, so on Wine the by-path load itself is still not checked.
  • Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input.

Regression run

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1384 (PresentX 1384)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR (5157a51):

xcl-smoke v1
commit: 5157a51c57a137f9500101d36b09a38e37a9329b
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1379 (PresentX 1379)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Under Wine, peak commit reads 0 MB, so these blocks do not check memory. The two runs are from the same morning, not back to back.

Not tested

  • the by-path load with a DLL that is not a Wine builtin; native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7132989515 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1151#issuecomment-7132989515). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T13:32:59Z. --- Rerun at `5157a51` under Wine on Linux: all `resolver::` tests pass now. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `5157a51` as it is (based on `47efa2e`) and `main` `47efa2e`, no uncommitted changes. The lib test binary runs under Wine, one test per process (`--exact`). - `resolver::` tests on `5157a51`: 7 passed, 0 failed, `failed_system_load_by_path_is_not_cached` and `system_load_by_path_loads_that_path` included. - Earlier, on `eecffed`: `system_load_by_path_loads_that_path` failed here at `assert_ne!(h, sys)` (both `123145285140480`). The prefix's `version.dll` is a Wine builtin (the file has the `Wine builtin DLL` marker), and Wine gave the System32 handle for the copy's path. With `5157a51` that check is skipped under Wine, so on Wine the by-path load itself is still not checked. - Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. **Regression run** main: ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1384 (PresentX 1384) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR (`5157a51`): ``` xcl-smoke v1 commit: 5157a51c57a137f9500101d36b09a38e37a9329b gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1379 (PresentX 1379) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. The two runs are from the same morning, not back to back. **Not tested** - the by-path load with a DLL that is not a Wine builtin; native Windows. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
pvfreis commented 2026-11-24 14:17:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-24T14:17:52Z.

Review: COMMENTED


Review of 5157a51 (merge base 47efa2e), by reading the code; nothing was built or run here. I checked system_module (resolver.rs:64-80) against its callers and that both new tests fail on the old code. No defect found.

Question for the author: a bare name that fails is no longer cached, so for a DLL that is not on the PC each import of it (resolver.rs:258) and each resolve_hle fallback lookup (resolver.rs:139, also reached from the title's GetProcAddress) runs a full failing LoadLibraryW search. Did you compare startup on a title that imports from such a DLL?

Review by Claude Code (written by Claude Opus 5.5, second read by Claude Fable 5.2); each point checked by a person before posting.

<!-- greyfinch-sync:ivall/xcl:review:6040850946 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#pullrequestreview-6040850946). Originally posted by [pvfreis](https://github.com/pvfreis) on 2026-11-24T14:17:52Z. **Review:** COMMENTED --- Review of `5157a51` (merge base `47efa2e`), by reading the code; nothing was built or run here. I checked `system_module` (`resolver.rs:64-80`) against its callers and that both new tests fail on the old code. No defect found. **Question for the author:** a bare name that fails is no longer cached, so for a DLL that is not on the PC each import of it (`resolver.rs:258`) and each `resolve_hle` fallback lookup (`resolver.rs:139`, also reached from the title's `GetProcAddress`) runs a full failing `LoadLibraryW` search. Did you compare startup on a title that imports from such a DLL? Review by Claude Code (written by Claude Opus 5.5, second read by Claude Fable 5.2); each point checked by a person before posting.
emirduran707 commented 2026-11-24 15:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T14:10:51Z.


Thanks @JoaoPauluu. Pushed 5157a51: system_load_by_path_loads_that_path now checks the load by path only when util::under_wine() is false, since Wine maps the builtin version.dll to the loaded module whatever the path. On Wine it still checks that the load succeeds and that the bare name gives the System32 module. Reran the suite and the smoke run on 5157a51 (Windows) and updated the description. #1218 is rebased onto it (8200da8), also rerun.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7133964664 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1151#issuecomment-7133964664). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T14:10:51Z. --- Thanks @JoaoPauluu. Pushed 5157a51: `system_load_by_path_loads_that_path` now checks the load by path only when `util::under_wine()` is false, since Wine maps the builtin `version.dll` to the loaded module whatever the path. On Wine it still checks that the load succeeds and that the bare name gives the System32 module. Reran the suite and the smoke run on 5157a51 (Windows) and updated the description. #1218 is rebased onto it (8200da8), also rerun. AI-assisted (Claude Code, Claude Opus 5.5).
emirduran707 commented 2026-11-24 21:08:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-24T19:32:08Z.


@pvfreis No, I had not measured it. Measured now, on Windows 11 Pro 26300 with a Ryzen 5 5600:

  • A bare-name LoadLibraryW that fails costs about 0.50 ms per call here (2,000 calls of a name that exists nowhere; a name already loaded costs 1.7 µs).
  • On the retail title, the run's report.json lists one import from a DLL that is not on the PC (xmem.dll, stubbed) out of 1,186 imports. So the import pass pays about 0.5 ms more at startup.
  • The resolve_hle fallback lookups at resolver.rs:139 go to the modules' fallback lists: kernelbase.dll, kernel32.dll, advapi32.dll, sechost.dll, xaudio2_9.dll, mfplat.dll, user32.dll, or the imported DLL's own name (SELF, skipped for the module's own name). Those load and are cached as before.
  • What does pay every time is a title that calls GetProcAddress on a missing DLL in a loop: 0.5 ms per call. I have not seen one do that. If one does, a negative cache keyed by name, cleared whenever a load by path succeeds, would bring the old speed back without keeping a stale failure.

Written with Claude Code (Claude Opus 5.5); the measurement is mine.

<!-- greyfinch-sync:ivall/xcl:comment:7142236596 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7142236596). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-24T19:32:08Z. --- @pvfreis No, I had not measured it. Measured now, on Windows 11 Pro 26300 with a Ryzen 5 5600: - A bare-name `LoadLibraryW` that fails costs about **0.50 ms** per call here (2,000 calls of a name that exists nowhere; a name already loaded costs 1.7 µs). - On the retail title, the run's `report.json` lists one import from a DLL that is not on the PC (`xmem.dll`, stubbed) out of 1,186 imports. So the import pass pays about 0.5 ms more at startup. - The `resolve_hle` fallback lookups at `resolver.rs:139` go to the modules' fallback lists: `kernelbase.dll`, `kernel32.dll`, `advapi32.dll`, `sechost.dll`, `xaudio2_9.dll`, `mfplat.dll`, `user32.dll`, or the imported DLL's own name (`SELF`, skipped for the module's own name). Those load and are cached as before. - What does pay every time is a title that calls `GetProcAddress` on a missing DLL in a loop: 0.5 ms per call. I have not seen one do that. If one does, a negative cache keyed by name, cleared whenever a load by path succeeds, would bring the old speed back without keeping a stale failure. Written with Claude Code (Claude Opus 5.5); the measurement is mine.
luckyteagirl commented 2026-11-25 05:08:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T04:36:12Z.


Native Windows resolver test report for PR #1151 at 5157a51c57a137f9500101d36b09a38e37a9329b

Setup: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC. Clean checkout of the PR's exact head.

Tested

  • cargo test --locked -p xcl --lib -j 2 resolver::tests -- --test-threads=1 --show-output: 7 passed, 0 failed, 0 ignored. Both new regressions passed: a failed load by path did not poison the later bare-name load, and an explicit path loaded the copied version.dll rather than the cached System32 module.
  • cargo build --locked --workspace -j 2: passed.

Not tested: Full workspace suite, a retail title that loads a DLL by full path, paired title smoke, or Wine. No game data was used.

AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted the counts from the log, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7152994433 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7152994433). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T04:36:12Z. --- ### Native Windows resolver test report for PR #1151 at `5157a51c57a137f9500101d36b09a38e37a9329b` **Setup:** Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M (driver `30.0.13002.13003`), Rust `1.99.0` MSVC. Clean checkout of the PR's exact head. **Tested** - `cargo test --locked -p xcl --lib -j 2 resolver::tests -- --test-threads=1 --show-output`: **7 passed, 0 failed, 0 ignored**. Both new regressions passed: a failed load by path did not poison the later bare-name load, and an explicit path loaded the copied `version.dll` rather than the cached System32 module. - `cargo build --locked --workspace -j 2`: passed. **Not tested:** Full workspace suite, a retail title that loads a DLL by full path, paired title smoke, or Wine. No game data was used. AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted the counts from the log, and drafted this report.
DavidM1911 commented 2026-11-26 04:07:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:52:35Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7182099212 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7182099212). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:52:35Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
thehollowedone commented 2026-11-27 20:21:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T20:21:15Z.


merge-check
base: 6089122a1c
head: 5157a51c57
merge: clean
build: cargo build --workspace -> ok
tests: XCL_ADAPTER=nvidia cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 1 failed, 47 ignored; 25 SKIPPED notices. Both new resolver::tests passed. The sole failure was gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (DXIL not compiled), also reproduced on untouched main at this base here.
review: No introduced runtime blocker found in the full diff. Explicit paths now reach LoadLibraryW as supplied, and each such call gets its own module reference that the title's FreeLibrary can release. Successful bare-name loads retain the existing cache; failures are no longer stored. The two new tests establish path bypass, but neither would fail if bare-name failures were cached again. A separate isolated-process regression could fail a unique bare-name lookup, make that DLL loadable, then retry and resolve an export. The copied version.dll in the path test is also left in its temporary directory after the test process exits. These are test-hygiene and coverage follow-ups, not an observed runtime failure in this change.
performance: No added work on successful cached bare-name lookups. Explicit path loads and failed bare-name probes now call the Windows loader on each attempt; their frequency and timing in a title were not measured.
verdict: safe to merge
hardware / tool and model: NVIDIA RTX 3080 Ti 12 GiB, driver 621.35; Ryzen 7 9800X3D; Windows 11 build 26300; rustc 1.99.1 MSVC; DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build and tests, reviewed the diff and drafted this check; Codex (GPT-6.2 Astra) independently reviewed loader ownership and test coverage.

<!-- greyfinch-sync:ivall/xcl:comment:7227419748 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7227419748). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-27T20:21:15Z. --- merge-check base: 6089122a1c96dff16e93b6fdf04c8ed20cfb6102 head: 5157a51c57a137f9500101d36b09a38e37a9329b merge: clean build: `cargo build --workspace` -> ok tests: `XCL_ADAPTER=nvidia cargo test --workspace --no-fail-fast -- --test-threads=4` -> 1466 passed, 1 failed, 47 ignored; 25 `SKIPPED` notices. Both new `resolver::tests` passed. The sole failure was `gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`DXIL not compiled`), also reproduced on untouched `main` at this base [here](https://github.com/xcl-dev/xcl/pull/671#issuecomment-7223888221). review: No introduced runtime blocker found in the full diff. Explicit paths now reach `LoadLibraryW` as supplied, and each such call gets its own module reference that the title's `FreeLibrary` can release. Successful bare-name loads retain the existing cache; failures are no longer stored. The two new tests establish path bypass, but neither would fail if bare-name failures were cached again. A separate isolated-process regression could fail a unique bare-name lookup, make that DLL loadable, then retry and resolve an export. The copied `version.dll` in the path test is also left in its temporary directory after the test process exits. These are test-hygiene and coverage follow-ups, not an observed runtime failure in this change. performance: No added work on successful cached bare-name lookups. Explicit path loads and failed bare-name probes now call the Windows loader on each attempt; their frequency and timing in a title were not measured. verdict: safe to merge hardware / tool and model: NVIDIA RTX 3080 Ti 12 GiB, driver 621.35; Ryzen 7 9800X3D; Windows 11 build 26300; rustc 1.99.1 MSVC; DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the build and tests, reviewed the diff and drafted this check; Codex (GPT-6.2 Astra) independently reviewed loader ownership and test coverage.
throny commented 2026-11-27 20:32:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:32:14Z.


merge-check claim
head: 5157a51c57

<!-- greyfinch-sync:ivall/xcl:comment:7227599730 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7227599730). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:32:14Z. --- merge-check claim head: 5157a51c57a137f9500101d36b09a38e37a9329b
throny commented 2026-11-27 20:52:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:52:23Z.


merge-check
base: 6089122a
head: 5157a51c57
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: no blocker. The name comes from the title through the LoadLibrary shims; main already passed a full path to LoadLibraryW on the first load of each base name, so no new kind of load: what changes is that a title's own copy of a DLL no longer replaces the cached system handle XCL itself uses, and a path can be loaded again after a failure. The title runs native code in this process anyway, so no boundary is crossed.
performance: failed loads are no longer cached: each failing bare name costs a full search (about 0.5 ms by the author's measurement); import resolution at start and the GetProcAddress fallback, not per frame unless a title polls (not measured).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7227919997 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1151#issuecomment-7227919997). Originally posted by [throny](https://github.com/throny) on 2026-11-27T20:52:23Z. --- merge-check base: 6089122a head: 5157a51c57a137f9500101d36b09a38e37a9329b merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored review: no blocker. The name comes from the title through the LoadLibrary shims; main already passed a full path to LoadLibraryW on the first load of each base name, so no new kind of load: what changes is that a title's own copy of a DLL no longer replaces the cached system handle XCL itself uses, and a path can be loaded again after a failure. The title runs native code in this process anyway, so no boundary is crossed. performance: failed loads are no longer cached: each failing bare name costs a full search (about 0.5 ms by the author's measurement); import resolution at start and the GetProcAddress fallback, not per frame unless a title polls (not measured). verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
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
xcl-dev/xcl!1142
No description provided.