library_loader: no ".dll" for an empty name; FreeLibrary drops the cached name (RT-LOADER-EMPTY-NAME-STALE-CACHE) #2525

Merged
Tyrannys merged 3 commits from upstream-pr/2525 into main 2026-11-29 00:15:27 +00:00
Tyrannys commented 2026-11-28 00:40:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-28T00:40:44Z.


Claimed in the coordination issue as: RT-LOADER-EMPTY-NAME-STALE-CACHE (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7231103456)

What and why

This fixes item 2 of kevincommits' finding in #1608 (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7230881417), in runtime/shims/library_loader.cpp.

  • ".dll" for no name. module_name() and module_name_w() strip the directory, then add .dll when no . is left. So "" and a path ending in a slash both came out as .dll. That name passed every dll.empty() guard and went to the bundled loader's lookups as if it were a module. Both functions now return an empty name in that case.
  • Stale cache after FreeLibrary. host_module_name() caches HMODULE -> module name for GetProcAddress on host modules, and free_library() never removed the entry. A different DLL loaded later at the same base was then served the freed module's shims. free_library() now erases the entry when FreeLibrary succeeds. If the module is still loaded (reference count above 1), the name is simply looked up again on the next call.

Tested

New test library_loader_names. It needs no game files.

  • A fake bundled loader records every name it is asked for. LoadLibraryA/W and GetModuleHandleA/W are called with "", with a path ending in a slash, and with a non-ASCII path ending in a slash. No .dll lookup may appear. A check also confirms that a name without an extension still gets .dll.
  • A new fixture, fixed_base_probe.dll, has no relocations and is linked /FIXED at one base, so every copy loads at the same address. One copy is loaded as wsock32.dll, a host module this test registers a shim for, and GetProcAddress serves that shim. The copy is freed, and a second copy under a plain name loads at the same base. GetProcAddress on it must not return the shim.
  • With main's library_loader.cpp, both checks fail. With the fix, the test passes.
  • ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader": 11/11 pass.

GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11 (CPU-only test)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5535020548 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525). Originally posted by [Tyrannys](https://github.com/Tyrannys) on 2026-11-28T00:40:44Z. --- Claimed in the coordination issue as: RT-LOADER-EMPTY-NAME-STALE-CACHE (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7231103456) ### What and why This fixes item 2 of kevincommits' finding in #1608 (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7230881417), in `runtime/shims/library_loader.cpp`. - **`".dll"` for no name.** `module_name()` and `module_name_w()` strip the directory, then add `.dll` when no `.` is left. So `""` and a path ending in a slash both came out as `.dll`. That name passed every `dll.empty()` guard and went to the bundled loader's lookups as if it were a module. Both functions now return an empty name in that case. - **Stale cache after `FreeLibrary`.** `host_module_name()` caches HMODULE -> module name for `GetProcAddress` on host modules, and `free_library()` never removed the entry. A different DLL loaded later at the same base was then served the freed module's shims. `free_library()` now erases the entry when `FreeLibrary` succeeds. If the module is still loaded (reference count above 1), the name is simply looked up again on the next call. ### Tested New test `library_loader_names`. It needs no game files. - A fake bundled loader records every name it is asked for. `LoadLibraryA/W` and `GetModuleHandleA/W` are called with `""`, with a path ending in a slash, and with a non-ASCII path ending in a slash. No `.dll` lookup may appear. A check also confirms that a name without an extension still gets `.dll`. - A new fixture, `fixed_base_probe.dll`, has no relocations and is linked `/FIXED` at one base, so every copy loads at the same address. One copy is loaded as `wsock32.dll`, a host module this test registers a shim for, and `GetProcAddress` serves that shim. The copy is freed, and a second copy under a plain name loads at the same base. `GetProcAddress` on it must not return the shim. - With main's `library_loader.cpp`, both checks fail. With the fix, the test passes. - `ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader"`: 11/11 pass. GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11 (CPU-only test) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timbot103 commented 2026-11-28 01:33:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T01:33:51Z.


Reviewed at head d1b7d10c7 on Windows 11 (MSVC 2022 19.44).

Verification

  • Built fixed_base_probe, library_loader_names_test, and gta6rt.
  • ctest -R "^library_loader_names$": passed.

Finding (Request changes)

  • Concurrent unload/base-reuse race window (library_loader.cpp:103-106, 278-284, 291-297):
    The empty-basename guards (library_loader.cpp:70-94) and sequential fixed-base unload/reload case work cleanly. However, free_library() calls native FreeLibrary(module) before acquiring loader_mutex() to erase module from host_module_names(). Between FreeLibrary() releasing the base address and the erase(), another thread can load a different DLL at that recycled base address and call GetProcAddress(), hitting the stale cached name and receiving the previous DLL's shims.
    (Note: holding loader_mutex() across FreeLibrary() would risk lock-order inversion with the OS loader lock during DllMain, so avoiding a persistent mutable HMODULE -> name cache — e.g., querying GetModuleFileNameW directly or validating/coupling cache lifetime without locking across FreeLibrary — is the safer direction.)

AI-assisted review + local MSVC verification.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7231755736 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7231755736). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T01:33:51Z. --- Reviewed at head `d1b7d10c7` on Windows 11 (MSVC 2022 `19.44`). ### Verification - Built `fixed_base_probe`, `library_loader_names_test`, and `gta6rt`. - `ctest -R "^library_loader_names$"`: **passed**. ### Finding (Request changes) - **Concurrent unload/base-reuse race window (`library_loader.cpp:103-106`, `278-284`, `291-297`):** The empty-basename guards (`library_loader.cpp:70-94`) and sequential fixed-base unload/reload case work cleanly. However, `free_library()` calls native `FreeLibrary(module)` before acquiring `loader_mutex()` to erase `module` from `host_module_names()`. Between `FreeLibrary()` releasing the base address and the `erase()`, another thread can load a different DLL at that recycled base address and call `GetProcAddress()`, hitting the stale cached name and receiving the previous DLL's shims. (Note: holding `loader_mutex()` across `FreeLibrary()` would risk lock-order inversion with the OS loader lock during `DllMain`, so avoiding a persistent mutable `HMODULE -> name` cache — e.g., querying `GetModuleFileNameW` directly or validating/coupling cache lifetime without locking across `FreeLibrary` — is the safer direction.) AI-assisted review + local MSVC verification.
Tyrannys commented 2026-11-28 02:07:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-28T02:07:52Z.


Thanks @timbot103, fixed in 450c5e52b by your suggested direction: the cache is gone.

  • host_module_name() now calls GetModuleFileNameW on every host-module GetProcAddress. Windows' answer always belongs to the module mapped at that base right now, so there is no entry left to go stale, and no lock is held across FreeLibrary.
  • free_library() is a plain FreeLibrary again.
  • The cost is one GetModuleFileNameW per GetProcAddress on a host module. That is a run-time lookup, not a hot path.

library_loader_names_test now reproduces the window itself:

  1. Load the fixture as wsock32.dll; it is served its shim.
  2. Unload it with the host's FreeLibrary directly, so the shim never sees the unload. This is what another thread sees between FreeLibrary and the old erase.
  3. Load the plain copy at the same base. It must not be served the shim.

The new check fails with the previous commit (cache plus erase) and passes now. ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader" passes 11/11. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232151669 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7232151669). Originally posted by [Tyrannys](https://github.com/Tyrannys) on 2026-11-28T02:07:52Z. --- Thanks @timbot103, fixed in 450c5e52b by your suggested direction: the cache is gone. - `host_module_name()` now calls `GetModuleFileNameW` on every host-module `GetProcAddress`. Windows' answer always belongs to the module mapped at that base right now, so there is no entry left to go stale, and no lock is held across `FreeLibrary`. - `free_library()` is a plain `FreeLibrary` again. - The cost is one `GetModuleFileNameW` per `GetProcAddress` on a host module. That is a run-time lookup, not a hot path. `library_loader_names_test` now reproduces the window itself: 1. Load the fixture as `wsock32.dll`; it is served its shim. 2. Unload it with the host's `FreeLibrary` directly, so the shim never sees the unload. This is what another thread sees between `FreeLibrary` and the old erase. 3. Load the plain copy at the same base. It must not be served the shim. The new check fails with the previous commit (cache plus erase) and passes now. `ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader"` passes 11/11. AI-assisted (Claude Code).
Tauwni commented 2026-11-28 04:20:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-28T04:20:58Z.


Tested on a Mac under Wine (Apple M3, macOS 26.5.1, Wine 11.0), merged onto main 02f71ccfe. Profile S, no game files.

library_loader_names fails under Wine, 3/3 runs on its own (MEASURED, 3 runs). The failing checks are the plain copy loads at the same base (fixed, no relocations) and ... at the same base again.

Why: Wine does not load the fixture copy named wsock32.dll. It serves its own builtin wsock32 instead. With a print added locally, first is 0x6FFFFE450000 (Wine's builtin) and second is 0x7E0000000 (the fixture's fixed base), 3/3 runs (MEASURED). So the test's premise, that the copy loaded as wsock32.dll is the fixture, does not hold under Wine.

With wsock32 set to native first (WINEDLLOVERRIDES=...;wsock32=n,b), the test passes 3/3 (MEASURED, 3 runs). The fix itself is not in question here.

A possible change, untested on Windows (ASSUMED harmless there, since Windows ignores the variable): give the test set_tests_properties(library_loader_names PROPERTIES ENVIRONMENT "WINEDLLOVERRIDES=wsock32=n,b"). Note that scripts/run_wine_tests.py builds its own WINEDLLOVERRIDES (merge_dll_overrides), so the entry may belong there instead.

Not checked by a second agent or human yet.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7233953998 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7233953998). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-28T04:20:58Z. --- Tested on a Mac under Wine (Apple M3, macOS 26.5.1, Wine 11.0), merged onto `main` `02f71ccfe`. Profile S, no game files. `library_loader_names` fails under Wine, 3/3 runs on its own (MEASURED, 3 runs). The failing checks are `the plain copy loads at the same base (fixed, no relocations)` and `... at the same base again`. **Why:** Wine does not load the fixture copy named `wsock32.dll`. It serves its own builtin `wsock32` instead. With a print added locally, `first` is `0x6FFFFE450000` (Wine's builtin) and `second` is `0x7E0000000` (the fixture's fixed base), 3/3 runs (MEASURED). So the test's premise, that the copy loaded as `wsock32.dll` is the fixture, does not hold under Wine. **With `wsock32` set to native first** (`WINEDLLOVERRIDES=...;wsock32=n,b`), the test passes 3/3 (MEASURED, 3 runs). The fix itself is not in question here. A possible change, untested on Windows (ASSUMED harmless there, since Windows ignores the variable): give the test `set_tests_properties(library_loader_names PROPERTIES ENVIRONMENT "WINEDLLOVERRIDES=wsock32=n,b")`. Note that `scripts/run_wine_tests.py` builds its own `WINEDLLOVERRIDES` (`merge_dll_overrides`), so the entry may belong there instead. Not checked by a second agent or human yet. AI-assisted (Claude Code).
Tyrannys commented 2026-11-28 04:36:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-28T04:36:38Z.


Thanks @Tauwni, and @timbot103 for the earlier review. Fixed in f6ec7480f, test only; the shim change from 450c5e52b is unchanged.

  • runtime/CMakeLists.txt: library_loader_names now runs with ENVIRONMENT "WINEDLLOVERRIDES=wsock32=n,b", as Tauwni suggested. Windows ignores the variable. scripts/run_wine_tests.py applies a test's ENVIRONMENT and then adds its own defaults, so it keeps the entry: merge_dll_overrides("wsock32=n,b") gives winedbg.exe=d;winemenubuilder.exe=d;wsock32=n,b. No runner change was needed.
  • library_loader_names_test: the check "the fixture loads as wsock32.dll" now also confirms that the loaded module is the test's own copy, comparing GetModuleFileNameW with the copied path. If the host serves its own wsock32, the test says so and skips the same-base checks. Before, it failed further down with a misleading "same base" message.

Windows 11, MSVC Release: library_loader_names passes 3 of 3 runs, and ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader" passes 11 of 11. Not run under Wine here, since there is no Wine setup on this machine. A Wine rerun would be welcome.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7234147852 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7234147852). Originally posted by [Tyrannys](https://github.com/Tyrannys) on 2026-11-28T04:36:38Z. --- Thanks @Tauwni, and @timbot103 for the earlier review. Fixed in f6ec7480f, test only; the shim change from 450c5e52b is unchanged. - `runtime/CMakeLists.txt`: `library_loader_names` now runs with `ENVIRONMENT "WINEDLLOVERRIDES=wsock32=n,b"`, as Tauwni suggested. Windows ignores the variable. `scripts/run_wine_tests.py` applies a test's `ENVIRONMENT` and then adds its own defaults, so it keeps the entry: `merge_dll_overrides("wsock32=n,b")` gives `winedbg.exe=d;winemenubuilder.exe=d;wsock32=n,b`. No runner change was needed. - `library_loader_names_test`: the check "the fixture loads as wsock32.dll" now also confirms that the loaded module is the test's own copy, comparing `GetModuleFileNameW` with the copied path. If the host serves its own wsock32, the test says so and skips the same-base checks. Before, it failed further down with a misleading "same base" message. Windows 11, MSVC Release: `library_loader_names` passes 3 of 3 runs, and `ctest -R "library_loader_names|dll_thread_calls|^xgameruntime$|loader"` passes 11 of 11. Not run under Wine here, since there is no Wine setup on this machine. A Wine rerun would be welcome. AI-assisted (Claude Code).
zmasi commented 2026-11-28 07:18:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T07:18:25Z.


#2525 | head f6ec7480ff (merged cleanly with main 09c1539483) | ctest --test-dir runtime/build -C RelWithDebInfo -R "^(library_loader_names|dll_thread_calls)$" --output-on-failure | red on main: library_loader_names fails (3 failure(s): empty/trailing-slash names turned into ".dll" for bundled-loader lookups, and a plain fixed-base DLL mapped at a freed wsock32.dll HMODULE inherited the unloaded module's cached shims both via shimmed and host FreeLibrary) | green on PR+main: 2/2 CTests pass (library_loader_names 11/11 checks in 0.67s with WINEDLLOVERRIDES=wsock32=n,b ignored cleanly on Windows 11, and dll_thread_calls 6/6 checks in 0.08s); check_no_game_data.py 0 violations | Windows 11, RTX 3090 (610.88), Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7235849472 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7235849472). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T07:18:25Z. --- #2525 | head f6ec7480ffc5ab126003baa1205bcf50b13cba5a (merged cleanly with main 09c153948386fd658fe2f999f6176efbaa8c8345) | `ctest --test-dir runtime/build -C RelWithDebInfo -R "^(library_loader_names|dll_thread_calls)$" --output-on-failure` | red on main: `library_loader_names` fails (`3 failure(s)`: empty/trailing-slash names turned into `".dll"` for bundled-loader lookups, and a plain fixed-base DLL mapped at a freed `wsock32.dll` `HMODULE` inherited the unloaded module's cached shims both via shimmed and host `FreeLibrary`) | green on PR+main: `2/2` CTests pass (`library_loader_names` `11/11` checks in `0.67s` with `WINEDLLOVERRIDES=wsock32=n,b` ignored cleanly on Windows 11, and `dll_thread_calls` `6/6` checks in `0.08s`); `check_no_game_data.py` `0` violations | Windows 11, RTX 3090 (610.88), Vulkan SDK 1.4.363.1 | AI-assisted: yes
timbot103 commented 2026-11-28 14:36:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T14:36:54Z.

Review: COMMENTED


Static code audit against f6ec7480f + ec740bcc3. The empty-basename guards and removal of the host-name cache address the two loader regressions. The test covers same-base reuse after shimmed and native FreeLibrary.

Minor test issue in runtime/test/library_loader_names_test.cpp:90 and :136. CTest passes the fixture path through narrow argv, which can substitute characters outside the Windows process code page before either fixture copy. That can fail the test from a Unicode build directory. Please use wmain and pass the wide path to both copies.

A final-head Wine run would verify the CTest override and fixture-identity assertion together.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6098419828 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#pullrequestreview-6098419828). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T14:36:54Z. **Review:** COMMENTED --- Static code audit against `f6ec7480f` + `ec740bcc3`. The empty-basename guards and removal of the host-name cache address the two loader regressions. The test covers same-base reuse after shimmed and native FreeLibrary. Minor test issue in `runtime/test/library_loader_names_test.cpp:90` and `:136`. CTest passes the fixture path through narrow `argv`, which can substitute characters outside the Windows process code page before either fixture copy. That can fail the test from a Unicode build directory. Please use `wmain` and pass the wide path to both copies. A final-head Wine run would verify the CTest override and fixture-identity assertion together. AI-assisted.
lixonik commented 2026-11-28 14:57:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T14:57:37Z.

Review: APPROVED


Reviewed f6ec7480f and verified library_loader_names on Windows 11.

Code audit:

  • runtime/shims/library_loader.cpp: guarding empty basenames in module_name_w / module_name prevents "" or trailing-slash paths from turning into ".dll", and querying GetModuleFileNameW directly in host_module_name eliminates the stale HMODULE cache bug when a freed base address is reused by another DLL.
  • runtime/CMakeLists.txt, runtime/test/library_loader_names_test.cpp: fixed-base fixture cleanly proves same-base DLL reuse after FreeLibrary.

Verification (Windows 11, MSVC 19.44, Ninja Release):

  • Built library_loader_names_test and fixed_base_probe.
  • ctest -R '^library_loader_names$': 1/1 passed (0.48 s).
  • python -I scripts/check_no_game_data.py: passed.

AI-assisted (Antigravity, Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6098523882 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#pullrequestreview-6098523882). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-28T14:57:37Z. **Review:** APPROVED --- Reviewed `f6ec7480f` and verified `library_loader_names` on Windows 11. Code audit: - `runtime/shims/library_loader.cpp`: guarding empty basenames in `module_name_w` / `module_name` prevents `""` or trailing-slash paths from turning into `".dll"`, and querying `GetModuleFileNameW` directly in `host_module_name` eliminates the stale `HMODULE` cache bug when a freed base address is reused by another DLL. - `runtime/CMakeLists.txt`, `runtime/test/library_loader_names_test.cpp`: fixed-base fixture cleanly proves same-base DLL reuse after `FreeLibrary`. Verification (Windows 11, MSVC 19.44, Ninja Release): - Built `library_loader_names_test` and `fixed_base_probe`. - `ctest -R '^library_loader_names$'`: **1/1 passed** (0.48 s). - `python -I scripts/check_no_game_data.py`: passed. AI-assisted (Antigravity, Gemini).
TheGeogeo commented 2026-11-28 23:23:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T23:23:28Z.


Tested f6ec7480f merged (no commit) with main aa918e5d9. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), RelWithDebInfo, Ninja.

  • Green: the new library_loader_names passes.
  • Red: with runtime/shims/library_loader.cpp back to main, it fails 3 checks:
    • an empty name or a path ending in a slash is not looked up as ".dll"
    • GetProcAddress on the new module does not serve the freed module's shim
    • a module mapped where an unloaded one was is not served its shims, without the shim seeing the unload
  • No regression: the merge relinks 9 executables, and their 20 other tests pass.

No blocker from my side. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247398827 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7247398827). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T23:23:28Z. --- Tested `f6ec7480f` merged (no commit) with `main` `aa918e5d9`. GPUs tested: NVIDIA GeForce RTX 3080, driver 621.40, Windows 11 10.0.26300; MSVC 19.52 (Visual Studio 18), RelWithDebInfo, Ninja. - Green: the new `library_loader_names` passes. - Red: with `runtime/shims/library_loader.cpp` back to `main`, it fails 3 checks: - `an empty name or a path ending in a slash is not looked up as ".dll"` - `GetProcAddress on the new module does not serve the freed module's shim` - `a module mapped where an unloaded one was is not served its shims, without the shim seeing the unload` - No regression: the merge relinks 9 executables, and their 20 other tests pass. No blocker from my side. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 00:15:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T00:15:30Z.


Merged after TheGeogeo's red/green check (check: library_loader_names passes with this PR, 3 checks fail with main's library_loader.cpp, no regression over the relinked tests) and a re-check here: no conflict with main 1b2021ba2, same head as checked, no-game-data green. The first Windows CI run failed one xmem_test check ("writing to 512 of them charges about those 512 pages"), which library_loader does not touch; on a re-run it passed, so it looks flaky. The only ctest failure left is vk_xdxr_postbuild_readback, a Vulkan test this diff does not touch.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247986609 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7247986609). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T00:15:30Z. --- Merged after **TheGeogeo**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/2525#issuecomment-7247398827): `library_loader_names` passes with this PR, 3 checks fail with `main`'s `library_loader.cpp`, no regression over the relinked tests) and a re-check here: no conflict with `main` 1b2021ba2, same head as checked, `no-game-data` green. The first Windows CI run failed one `xmem_test` check ("writing to 512 of them charges about those 512 pages"), which `library_loader` does not touch; on a re-run it passed, so it looks flaky. The only ctest failure left is `vk_xdxr_postbuild_readback`, a Vulkan test this diff does not touch. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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
ProjectLeonida/mandy!2525
No description provided.