Skip to content

WOW64: guard exception handling before FEX thread initialization - #25

Open
butilly wants to merge 1 commit into
mainfrom
fix/touhou8-fexcore-startup-fix
Open

butilly wants to merge 1 commit into
mainfrom
fix/touhou8-fexcore-startup-fix

Conversation

@butilly

@butilly butilly commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Game: Touhou 8 - Imperishable Night; executable: th08 (thpatch-en).exe. Discord thread: 1568517750530515105. FEX 2605 on Proton 10 ARM64EC repeatedly stops before the game module or graphics loads: virtual_setup_exception stack overflow 1856 bytes at libwow64fex.dll+0xF9BA4. Corrected FEX_SILENTLOG=0 yields no WOW64 diagnostics. Source inspection finds BTCpuResetToConsistentStateImpl dereferences a potentially null TLS thread in FEXCORE_PROFILE_ACCUMULATION, CallRetStack and JITGuardPage before its existing null check. Move the null-thread handling ahead of all those uses, preserving process-wide overcommit handling and passing other pre-thread exceptions to Wine. Normal initialized-thread handling is unchanged. This addresses a concrete recursive-exception hazard consistent with the symptom; no symbols prove the reported RVA belongs to this path, and the initial exception remains unknown. Validation: git diff --check; CI builds; on-device follow-up must check disappearance of stack-overflow recursion and whether th08 loads or the original exception becomes visible. No Proton major, architecture, or graphics changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant