Repository navigation
docs/boot: name LEONIDA_TLS_GA_PATCH, the loader's /GA TLS rewrite switch (test_docs_env_vars red on main) - #9300
kristofbarany wants to merge 2 commits into
Conversation
…itch b7a3fed made the loader read LEONIDA_TLS_GA_PATCH (runtime/src/pe_loader.cpp, ga_tls_patch_enabled) but no document names it, so tests/test_docs_env_vars.py fails on main. docs/boot.md's "Useful switches" now says what the rewrite does (a /GA EXE's gs:[58h] slot-0 TLS reads read a TlsAlloc slot of its own when its module TLS index is not 0), the line it logs, that LEONIDA_TLS_GA_PATCH=0 turns it off, and that without it the retail executable's allocator faults at exe+0x104075 (boot chain stop 4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Independent Windows 11 CPU Peer ReviewTested commit What Changed
Positive ControlNegative ControlReverting On Hygiene & Standards
Ready to merge. AI-assisted peer review. |
|
Checked
AI-assisted: yes (Windows host, CPU-only, no GPU and no game files). |
Review on ItsNotRexed#9300: the fault address was not traceable to a source in the tree. It is the one b7a3fed names ("retail boot AV at exe+0x104075"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @Running-Agama. Good catch on the address: |
|
Tested d36d822 on Linux, Python 3.14.4: pass (docs only) |
Claimed in the coordination issue as: new item (claim)
What and why
b7a3fed made the loader read
LEONIDA_TLS_GA_PATCH(runtime/src/pe_loader.cpp,ga_tls_patch_enabled()), but no.mdfile names it, sotests/test_docs_env_vars.pyfails on main 6312c05:docs/boot.md's "Useful switches" list, next toLEONIDA_UNIMPLEMENTEDandLEONIDA_SKIP_INT3, now names it:/GAEXE'smov r64, gs:[58h]slot-0 TLS reads, in its executable sections, read aTlsAllocslot of its own when its module TLS index is not 0;=0turns it off;exe+0x104075, stop 4 inretail_boot_chain.md.Each statement is taken from the code and the commit: the condition at the call site (an EXE with TLS, index not 0, switch not
0),patch_ga_tls_reads, and the log format string.Tested
Windows 11 Pro 26300, CPython 3.12.10, merged onto main 6312c05:
python -I tests/test_docs_env_vars.py: OK (main: FAILED, the failure above).tests/test_docs*.py:test_docs_cli_flags,test_docs_design_rowsandtest_docs_linksfail identically on main. Thetest_docs_linksfailure is an existingdev-tools.mdanchor, not the new link. The rest are OK.git diff --checkandscripts/check_no_game_data.py docs/boot.md: clean.I also run this loader on the retail executable: the line it logs on my copy of 1.0.2.1 is the one quoted in the doc.
AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Docs only.)🤖 Generated with Claude Code