test(relinker): run the Windows TLS cases on Linux x86-64 #1234
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1234"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hashaam1217 on 2026-10-07T18:52:58Z.
What
tls_function_coveragebuilds execution cases (the ALU reads from #767, the displacement loads from #340 and others) that return 42 when every value, register and flag is right. They only run whereos.name == "nt"; on Linux the test checks stub bytes, so a stub that is byte-correct but wrong at run time passes the Linux job.windows_image_runner.pyruns a relinked PE on Linux x86-64:GSat a TEB whoseThreadLocalStoragePointer(+0x58) holds that block (arch_prctl(ARCH_SET_GS); glibc does not useGSon x86-64);DLL_PROCESS_ATTACHwith the Windows argument registers (rcx,rdx,r8);convert()runs it on Linux x86-64 where it already runs the.exeon Windows, and expects 42 the same way. Other hosts are unchanged.Tested
Ubuntu 24.04.5, Python 3.12.3, relinker from
main(cea1ef13).test_tls_function_coverage.pypasses and now executes every caseconvert()relinks: 4.9 s, was 0.7 s.('unwind-table', 0, b'')), and with a wrong TLS index the first case crashes (-11).tools/check_conventions.py --base origin/main: passed.#1117 and #1233 also edit this test; both merge without conflict.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code