<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/test/loader_test.cpp, branch main</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=main</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-28T19:01:06+00:00</updated>
<entry>
<title>tests: derive every test's scratch folder from test_temp_dir::temp_dir, not GetTempPath (TEST-TEMPDIR-STRIPPED-ENV)</title>
<updated>2026-11-28T19:01:06+00:00</updated>
<author>
<name>thiefyzheng</name>
<email>thiefyzheng@users.noreply.github.com</email>
</author>
<published>2026-11-25T05:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=b17397f0dd77280e107de489fc0f2a92471ace60'/>
<id>urn:sha1:b17397f0dd77280e107de489fc0f2a92471ace60</id>
<content type='text'>
With TMP, TEMP and USERPROFILE all unset, GetTempPathW returns C:\Windows\, and the throwing create_directories/copy_file/ofstream on C:\Windows\leonida_* aborts with 0xc0000409 before the test body runs. runtime/test/test_temp_dir.h grows one entry, testfiles::temp_dir(): LEONIDA_TEST_DIR when set, the current directory when the temp environment is stripped (Windows), else the standard temp resolution. Fifty-two test files and the tiny_game fixture that called GetTempPathA/W or temp_directory_path directly now use it; d3d12_queue_handover_test.cpp also checks the _sopen_s result in capture_stderr instead of silently returning empty stderr. One runtime source function needed the same fallback because tests exercise it: tls_host_clone_dir in runtime/src/pe_loader.cpp (the loader_tls tests). Rebased onto current main after its D3D-448 additions to d3d12_mesh_test.cpp (3-way; the mesh test keeps both). Verification on a Windows VM: stripped environment - the previously crashing d3d12 tests exit 77 (no usable Vulkan device) instead of aborting, file_system_test runs all 505 checks and loader_test all 95 with zero failures; normal environment - identical outcomes; LEONIDA_TEST_DIR honored under a fully stripped environment (the scratch folder observed mid-run inside it, cleaned up after the pass). The finding is whoalin1's (coordination issue #14, 02:37:44Z).

AI-assisted.
</content>
</entry>
<entry>
<title>Merge pull request #2499 from Tyrannys/rt-loader-runtime-scope-and-tls-slot</title>
<updated>2026-11-28T17:51:52+00:00</updated>
<author>
<name>MoonEyes</name>
<email>ducoinbenjamin@yahoo.fr</email>
</author>
<published>2026-11-28T17:51:52+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=cd124a402ecff17e4da6f7e35942d261d55401b0'/>
<id>urn:sha1:cd124a402ecff17e4da6f7e35942d261d55401b0</id>
<content type='text'>
loader: wide run-time loads are dynamic; set tls_ga_slot before publishing (RT-LOADER-RUNTIME-SCOPE-AND-TLS-SLOT)</content>
</entry>
<entry>
<title>Merge pull request #1565 from Mike7581/rt-compat-dir-runtime-loads</title>
<updated>2026-11-28T03:48:31+00:00</updated>
<author>
<name>AndréLanD</name>
<email>andreviniciusmerlia@gmail.com</email>
</author>
<published>2026-11-28T03:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=f77359c5b42fdba8025bf4bf6cf553a945a8451b'/>
<id>urn:sha1:f77359c5b42fdba8025bf4bf6cf553a945a8451b</id>
<content type='text'>
loader: a run-time LoadLibrary takes the LEONIDA_COMPAT_DIR module too (RT-COMPAT-DIR-RUNTIME-LOADS)</content>
</entry>
<entry>
<title>main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia</title>
<updated>2026-11-27T22:58:38+00:00</updated>
<author>
<name>NotRexed</name>
<email>therealnothingfn@gmail.com</email>
</author>
<published>2026-11-27T22:58:38+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=00131bb85ee294179e5179b00a2c68f4ea3610b5'/>
<id>urn:sha1:00131bb85ee294179e5179b00a2c68f4ea3610b5</id>
<content type='text'>
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge mandy's main into port/d3d12-nvidia</title>
<updated>2026-11-27T22:50:37+00:00</updated>
<author>
<name>NotRexed</name>
<email>therealnothingfn@gmail.com</email>
</author>
<published>2026-11-27T22:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=b87abdef5735adc68a614b2025ffcf9869a47cc5'/>
<id>urn:sha1:b87abdef5735adc68a614b2025ffcf9869a47cc5</id>
<content type='text'>
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>loader: wide run-time loads are dynamic; set tls_ga_slot before publishing (RT-LOADER-RUNTIME-SCOPE-AND-TLS-SLOT)</title>
<updated>2026-11-27T19:40:23+00:00</updated>
<author>
<name>Tyrannys</name>
<email>80750971+Tyrannys@users.noreply.github.com</email>
</author>
<published>2026-11-27T19:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=1a49f137576cc2051a0ee49f3f3731506054e1ce'/>
<id>urn:sha1:1a49f137576cc2051a0ee49f3f3731506054e1ce</id>
<content type='text'>
Loader::load_runtime_module_w (LoadLibraryW / LoadLibraryExW of a
bundled DLL) did not open a RuntimeLoadScope, unlike the narrow path and
resolve_module_export. The module was mapped as a static load, so its
DllMain(DLL_PROCESS_ATTACH) got a non-NULL lpvReserved. It now opens the
scope too.

Loader::initialize_tls patched an executable's /GA TLS reads and wrote
m.tls_ga_slot after it had published the slot owner and released
ExclusiveTlsLock, while a thread starting then reads m.tls_ga_slot in
install_thread_block under SharedTlsLock. The patch and the write now
happen before the owner is published.

loader_test checks the wide path's lpvReserved (fails on main);
loader_tls_index0_test checks that the noreserve executable gets its
/GA slot.

Found by kevincommits on #1608.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>loader_test: no Bad Image dialogs for the images it loads to be refused</title>
<updated>2026-11-26T05:05:14+00:00</updated>
<author>
<name>NotRexed</name>
<email>therealnothingfn@gmail.com</email>
</author>
<published>2026-11-26T05:05:14+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=3cd850d18d819a5c75b00aa00c78de59cc34da99'/>
<id>urn:sha1:3cd850d18d819a5c75b00aa00c78de59cc34da99</id>
<content type='text'>
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX) at start: the
deliberately broken compat_bad\testcompat.dll (0xc000012f) showed a dialog on the desktop per load.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>loader: compat run-time loads honour LoadLibraryEx flags and Windows-loaded dependencies</title>
<updated>2026-11-25T18:15:43+00:00</updated>
<author>
<name>Mike7581</name>
<email>168859477+Mike7581@users.noreply.github.com</email>
</author>
<published>2026-11-25T18:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=2cca47b5c8971c885961c35741ab8b0f0debaa01'/>
<id>urn:sha1:2cca47b5c8971c885961c35741ab8b0f0debaa01</id>
<content type='text'>
Review follow-up for #1565:
- LoadLibraryEx with DONT_RESOLVE_DLL_REFERENCES on a LEONIDA_COMPAT_DIR module fails with ERROR_NOT_SUPPORTED, before loading or returning a loaded handle, as for bundled DLLs.
- A compat DLL that Windows loaded as another compat DLL's dependency is recognised: compat_handle() finds it by its full path, and owns_compat_handle() by its folder (read outside mutex_, since GetModuleFileNameW can take the loader lock), so GetModuleHandle and LoadLibrary return it and GetProcAddress never fills in a missing export from the shim.
- A name with a directory gets the compat DLL only when it is that file; any other path goes on as without the folder.
- Names outside ASCII reach the compat lookup (it runs before the ASCII / wide split).
- The folder's file names are listed once per Loader, so lookups no longer touch the disk.

loader_test: test_compat_runtime_edges adds six cases for the first four points, through LoadLibraryExA/W, LoadLibraryW, GetModuleHandleW and GetProcAddress; all six fail on 582e14d. The listing has no functional test.
</content>
</entry>
<entry>
<title>loader: a run-time LoadLibrary takes the LEONIDA_COMPAT_DIR module too</title>
<updated>2026-11-25T04:38:28+00:00</updated>
<author>
<name>Mike7581</name>
<email>168859477+Mike7581@users.noreply.github.com</email>
</author>
<published>2026-11-25T04:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=582e14d922ad9b24a63ba55f7b8e57bd4aef3c08'/>
<id>urn:sha1:582e14d922ad9b24a63ba55f7b8e57bd4aef3c08</id>
<content type='text'>
LEONIDA_COMPAT_DIR only applied to static imports: runtime/README.md said "a run-time LoadLibrary of the
same name does not yet". A mapped image's LoadLibrary of a module the folder holds got the shim's
pseudo-handle instead of the drop-in DLL, and GetProcAddress on the compat DLL's real handle looked the
name up in the shim of the same module name first, so one console module could be served half by the
drop-in and half by the shim, which the static step exists to prevent.

Now shims::BundledModuleOps gains compat_module / owns_compat_handle, which rt::Loader answers from the
same compat_handle() its static step (resolve_compat) uses, so both get one HMODULE per module. In
shims/library_loader.cpp:
  - LoadLibrary* checks the compat folder before the shim registry and the bundled package DLLs;
  - GetModuleHandle* answers a compat module's handle once it is loaded and NULL before (never the shim's
    pseudo-handle);
  - GetProcAddress on a compat handle gives only that DLL's exports;
  - FreeLibrary on it returns TRUE and keeps it loaded (it is the Loader's reference, static imports may
    be bound through it; compat modules stay for the process lifetime).
A compat file Windows refuses fails that LoadLibrary with Windows' error (logged) instead of throwing
into the title.

loader_test links library_loader.cpp and gains test_compat_runtime_loads: eight cases with a synthetic
drop-in DLL and the test shim module, no game data.
</content>
</entry>
<entry>
<title>pe_loader: the relocation-move notes stop citing the old pull request number</title>
<updated>2026-11-24T10:00:08+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-24T10:00:08+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=bb256ebbf32d7493e3d867923ec737e60d3f9f9d'/>
<id>urn:sha1:bb256ebbf32d7493e3d867923ec737e60d3f9f9d</id>
<content type='text'>
The Windows 11 measurement behind this behaviour was posted in a review of pull request 8847 of the original
repository, which went private on 2026-11-23, so its link and the "#8847" references in pe_loader.cpp and
loader_test.cpp lead nowhere now. runtime/README.md keeps the measurement and the open question in its own
words and names where it came from; the code comments point at the README. No behaviour changes.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
