cpu: compare implicit TLS values on main and worker threads #523
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!523
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/523/head"
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?
@yummancito on GitHub · 2026-11-22 09:00 UTC · original
yummancito:test/tls-thread-value→main· +323 −0 · 4 files · 2 commits · merged 2026-11-22 09:53 UTCDifferential 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.