docs: note the carrier temp directory requirement of the TLS fixtures #1116

Merged
ChazY11 merged 2 commits from upstream-pr/1123 into main 2026-11-24 02:17:36 +00:00
ChazY11 commented 2026-11-24 01:24:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T01:24:13Z.


What

The TLS carrier directory and the file inside it are created under GetTempPathW
(tools/pe_map.cpp, load_carrier). On a host where a built executable may not create a file in that directory, six
fixtures fail at that step with cannot create the TLS carrier directory (error 5) and the message reads like a TLS
defect. This adds one bullet to Windows build notes and the measured case to the cpu_native_tls section, so the
next reporter recognises it in one step instead of six.

Measured

Host: Windows 11 build 26300.9974, x64, Core Ultra 9 285H, MSVC 14.44.35207, Windows SDK 10.0.26100,
Python 3.12.10, commit 110e186, dev preset.

A 30-line probe compiled with the same toolchain, in the same shell, calling only CreateDirectoryW and
CreateFileW:

root=C:\Users\<user>\AppData\Local\Temp\   (%TEMP%, where GetTempPathW points)
  CreateDirectory : ok=0 error=5
  CreateFile      : ok=0 error=5
root=C:\Users\<user>\Documents\
  CreateDirectory : ok=0 error=5
  CreateFile      : ok=0 error=5
root=C:\Windows\Temp\
  CreateDirectory : ok=0 error=5
  CreateFile      : ok=0 error=5
root=D:\<work>\
  CreateDirectory : ok=1 error=0
  CreateFile      : ok=1 error=0

So the protected DACL the fixture passes is not involved: a plain call fails the same way, and the whole system
volume refuses creation for that process while another volume accepts it. The same shell's own file operations
succeed under %TEMP%, so it is a property of the process that runs the built binaries.

Confirmation, one variable changed:

New-Item -ItemType Directory -Force -Path 'D:\tmp' | Out-Null
$env:TMP='D:\tmp'; $env:TEMP='D:\tmp'
ctest --preset dev --no-tests=error -R '^(cpu_exe_aot_convert|cpu_native_tls|cpu_native_tls_value|cpu_native_exe_tls|cpu_native_exe_tls_slot0|cpu_native_exe_tls_slot0_enroll)$'
1/6 Test #306: cpu_exe_aot_convert ...............   Passed
2/6 Test #337: cpu_native_tls ....................   Passed
3/6 Test #339: cpu_native_tls_value ..............   Passed
4/6 Test #351: cpu_native_exe_tls ................   Passed
5/6 Test #353: cpu_native_exe_tls_slot0 ..........   Passed
6/6 Test #354: cpu_native_exe_tls_slot0_enroll ...   Passed
100% tests passed, 0 tests failed out of 6

Without the change the six are FAIL, and the cpu_ group is 202/208 (report in #1096).

Tested

.\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py
  Self-test passed. Checked 15 Markdown files and 244 links.

Docs only: no source, fixture, CMake or expectation change. The rejection expectations in native_tls_check.py are
untouched, because a host that cannot create the carrier directory never reaches them.

Notes

  • AI-assisted; every number above is from this machine, and the probe is available if you want it under tests/.
  • Refs #1096, which has the root cause and the options I offered (this doc note, a named capability skip in the
    caller, or the probe as tooling). This PR is only the first of the three.
  • Nothing from a game: no files, dumps, logs or distribution links.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6572468383 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1123). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T01:24:13Z. --- ## What The TLS carrier directory and the file inside it are created under `GetTempPathW` (`tools/pe_map.cpp`, `load_carrier`). On a host where a built executable may not create a file in that directory, six fixtures fail at that step with `cannot create the TLS carrier directory (error 5)` and the message reads like a TLS defect. This adds one bullet to **Windows build notes** and the measured case to the `cpu_native_tls` section, so the next reporter recognises it in one step instead of six. ## Measured Host: Windows 11 build 26300.9974, x64, Core Ultra 9 285H, MSVC 14.44.35207, Windows SDK 10.0.26100, Python 3.12.10, commit `110e186`, `dev` preset. A 30-line probe compiled with the same toolchain, in the same shell, calling only `CreateDirectoryW` and `CreateFileW`: ```text root=C:\Users\<user>\AppData\Local\Temp\ (%TEMP%, where GetTempPathW points) CreateDirectory : ok=0 error=5 CreateFile : ok=0 error=5 root=C:\Users\<user>\Documents\ CreateDirectory : ok=0 error=5 CreateFile : ok=0 error=5 root=C:\Windows\Temp\ CreateDirectory : ok=0 error=5 CreateFile : ok=0 error=5 root=D:\<work>\ CreateDirectory : ok=1 error=0 CreateFile : ok=1 error=0 ``` So the protected DACL the fixture passes is not involved: a plain call fails the same way, and the whole system volume refuses creation for that process while another volume accepts it. The same shell's own file operations succeed under `%TEMP%`, so it is a property of the process that runs the built binaries. Confirmation, one variable changed: ```powershell New-Item -ItemType Directory -Force -Path 'D:\tmp' | Out-Null $env:TMP='D:\tmp'; $env:TEMP='D:\tmp' ctest --preset dev --no-tests=error -R '^(cpu_exe_aot_convert|cpu_native_tls|cpu_native_tls_value|cpu_native_exe_tls|cpu_native_exe_tls_slot0|cpu_native_exe_tls_slot0_enroll)$' ``` ```text 1/6 Test #306: cpu_exe_aot_convert ............... Passed 2/6 Test #337: cpu_native_tls .................... Passed 3/6 Test #339: cpu_native_tls_value .............. Passed 4/6 Test #351: cpu_native_exe_tls ................ Passed 5/6 Test #353: cpu_native_exe_tls_slot0 .......... Passed 6/6 Test #354: cpu_native_exe_tls_slot0_enroll ... Passed 100% tests passed, 0 tests failed out of 6 ``` Without the change the six are `FAIL`, and the `cpu_` group is 202/208 (report in #1096). ## Tested ```text .\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py Self-test passed. Checked 15 Markdown files and 244 links. ``` Docs only: no source, fixture, CMake or expectation change. The rejection expectations in `native_tls_check.py` are untouched, because a host that cannot create the carrier directory never reaches them. ## Notes - AI-assisted; every number above is from this machine, and the probe is available if you want it under `tests/`. - `Refs #1096`, which has the root cause and the options I offered (this doc note, a named capability skip in the caller, or the probe as tooling). This PR is only the first of the three. - Nothing from a game: no files, dumps, logs or distribution links.
upstream-sync closed this pull request 2026-11-24 06:46:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1116
No description provided.