startup: let X2W_PROBE_PRECHECK=0 turn the probe pre-check off under a debugger #3313
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3313"
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 lukaslw-lab on 2026-11-28T08:09:48Z.
Change
precheck_enabled()(src/startup_stubs/local_log.h) now readsX2W_PROBE_PRECHECKfirst:0turns the probepre-check from #2846 off, any other value turns it on, and only an unset variable falls back to
IsDebuggerPresent().Before, the variable could only turn it on, so title runs, which always start under
debug_launch.py, paid aVirtualQuerybefore everyprobe_readableand guarded copy with no way out. Unset behaviour is unchanged. Thedocs/startup-runtime.mdrow says the same. Fixes #3312. Refs #2846.Verification
Commit
cdce92daonmain1f07b2c1, Windows 10 22H2 (build 19045), Visual Studio 2026 18.12 (MSVC 19.52), WindowsSDK 10.0.26100, CMake 4.3.1, Python 3.13.7.
Startup run of the main executable (local, same host, RTX 3080 Ti, NVIDIA 32.0.16.1047):
mainfd7ce57awith thischange and
X2W_PROBE_PRECHECK=0gave 11.2 fps between 140 and 190 s, against 1.2 at #2846 and 14.5 at its parent(numbers and bisect in #3312).
Evidence and follow-up
startup_local_log_precheck_off_debugger(source-built, MIT): sets the PEB'sBeingDebuggedbyte, which is whatIsDebuggerPresentreads, then withX2W_PROBE_PRECHECK=0requires a free range to be refused by the touch, withone first-chance fault and nothing counted in
faults_avoided. No real debugger is attached, so the fault reachesthe test's vectored handler.
no refusal is counted as an avoided fault,the free range is found by the touch, one first-chance fault each; 2 of 5), while the existingstartup_local_log_precheck_offstill passes.Checklist
AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC.
🤖 Generated with Claude Code