cpu: compare implicit TLS values on main and worker threads #517
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/523"
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 R0Y00/Xbox2Windows. Originally posted by yummancito on 2026-11-22T09:00:42Z.
Differential regression test for #165: a TLS callback reading a thread-local value on the main thread and on a worker, with observed thread identities and values under both loaders.
This is the remaining comparison requested after #296: native
LoadLibraryWvspe_mapon a source-built DLL with one__declspec(thread)value (7), a.CRT$XLBTLS callback, and aDllMain. The harness runs each loader in a fresh child process, reads the value on the main thread, runs one worker thread whose start routine returns its own TLS value (10 s join limit), and compares sink events with raw OS thread IDs translated to semantic identities (main/worker).Measured behavior ( documents the gap, changes no loader code ):
7on both main and worker threads.pe_maprejects the image withMAP_UNSUPPORTED / TLS data; no callback events — recorded as the expected verifiable condition, not a CTest failure. Any other mapping failure, worker timeout, missing callback, or unexpected value fails the test.Controls: the empty-template
cpu_tls_originalfixture must load under both loaders.Files:
tests/cpu/tls_value.cpp,tests/cpu/native_tls_value_check.py,CMakeLists.txt(newcpu_tls_valuelib +cpu_native_tls_valuetest),docs/experiments.md.CI (fork, Windows 2025, commit
e746767): https://github.com/yummancito/Xbox2Windows/actions/runs/45004809320 — 100% tests passed, 194/194, in both Development and Release (/O2) jobs;cpu_native_tls_valuepassed in both (0.49 s / 0.71 s). No other code touched.This PR adds regression coverage only; it does not implement implicit-TLS support in
pe_map.