runtime: retain the TLS directory in the /GA test fixture #773

Manually merged
github merged 1 commit from gh-pr/773/head into gh-pr/773/base 2026-11-26 09:20:41 +00:00
Owner

@⁠moffington on GitHub · 2026-11-24 13:39 UTC · original
moffington:fix/loader-tls-ga-fixture → main · +4 −1 · 2 files · 1 commits · merged 2026-11-24 14:37 UTC

Claimed in the coordination issue as: loader_tls /GA fixture

What and why

clang-cl's /GA removes the fixture's only _tls_index reference. lld-link then omits the PE TLS directory, so the loader never reaches the TLS rewrite. Add /INCLUDE:_tls_used to tiny_ga_tls and make the index assertion reject kNoTlsIndex. #532 independently reports the same seven failures on Windows with clang-cl and xwin.

Tested

  • Omarchy Linux, Wine 11.20, clang-cl/lld-link 23.1.3, xwin 0.10.0. Unpatched 2d73c242f failed 7 of 95 checks. The fix restores the TLS directory, rewrites two sites per load, and passes 95 of 95 checks, including when applied to refreshed main at 47c651174.
  • All 15 focused loader CTests passed. loader_tls passed in Debug, Release, RelWithDebInfo, and MinSizeRel. Fixtures built with MSVC 19.44 and link.exe 14.44 also passed in all four configurations under Wine.

Pre-existing failure. The expanded run passed 28 of 29 tests. run_startup_cmdline also fails on unpatched main in the standalone fixture check before invoking the loader.

GPUs tested: NVIDIA GeForce RTX 3060, driver 615.78.08, Omarchy Linux (Vulkan frame tests). TLS tests are CPU-only.

AI-assisted: yes

**@⁠moffington** on GitHub · 2026-11-24 13:39 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/773) `moffington:fix/loader-tls-ga-fixture` → `main` · +4 −1 · 2 files · 1 commits · merged 2026-11-24 14:37 UTC Claimed in the coordination issue as: [loader_tls /GA fixture](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why clang-cl's `/GA` removes the fixture's only `_tls_index` reference. lld-link then omits the PE TLS directory, so the loader never reaches the TLS rewrite. Add `/INCLUDE:_tls_used` to `tiny_ga_tls` and make the index assertion reject `kNoTlsIndex`. #532 independently reports the same seven failures on Windows with clang-cl and xwin. ### Tested - Omarchy Linux, Wine 11.20, clang-cl/lld-link 23.1.3, xwin 0.10.0. Unpatched `2d73c242f` failed 7 of 95 checks. The fix restores the TLS directory, rewrites two sites per load, and passes 95 of 95 checks, including when applied to refreshed `main` at `47c651174`. - All 15 focused loader CTests passed. `loader_tls` passed in Debug, Release, RelWithDebInfo, and MinSizeRel. Fixtures built with MSVC 19.44 and `link.exe` 14.44 also passed in all four configurations under Wine. **Pre-existing failure.** The expanded run passed 28 of 29 tests. `run_startup_cmdline` also fails on unpatched `main` in the standalone fixture check before invoking the loader. GPUs tested: NVIDIA GeForce RTX 3060, driver 615.78.08, Omarchy Linux (Vulkan frame tests). TLS tests are CPU-only. AI-assisted: yes
Force the CRT TLS directory into tiny_ga_tls when /GA removes the last _tls_index reference. Reject the unassigned TLS index in the test so missing metadata fails the index check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:20:40 +00:00
github manually merged commit 1052aad6c1 into gh-pr/773/base 2026-11-26 09:20:41 +00:00
Author
Owner

@⁠moffington on GitHub · 2026-11-25 13:16 UTC · original

Discord user is col0038

**@⁠moffington** on GitHub · 2026-11-25 13:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/773#issuecomment-7163540134) Discord user is col0038
This discussion has been locked. Commenting is limited to contributors.
No description provided.