Skip to content

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

Merged
ubiquitarianism merged 1 commit into
ProjectLeonida:mainfrom
moffington:fix/loader-tls-ga-fixture
Nov 24, 2026
Merged

ubiquitarianism merged 1 commit into
ProjectLeonida:mainfrom
moffington:fix/loader-tls-ga-fixture

Conversation

@moffington

Copy link
Copy Markdown
Contributor

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

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.
@ubiquitarianism
ubiquitarianism merged commit 909051f into ProjectLeonida:main Nov 24, 2026
4 of 6 checks passed
@moffington

Copy link
Copy Markdown
Contributor Author

Discord user is col0038

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants