upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/thread_stacks.cpp
diff options
context:
space:
mode:
authornatterman12 <92529018+natterman12@users.noreply.github.com>2026-11-23 21:50:56 -0500
committernatterman12 <92529018+natterman12@users.noreply.github.com>2026-11-23 21:50:56 -0500
commit682fd0561cd5e649d199adb9633b81b26baf26a6 (patch)
tree836965070f58d2a27939fffa69a63747dfa078fd /runtime/src/thread_stacks.cpp
parent84347bbb61ed406db10195f50d5911893b8b9a4b (diff)
pe_loader: a compat DLL Windows cannot load is refused without a "Bad Image" box
resolve_compat() calls LoadLibraryExW on a file from LEONIDA_COMPAT_DIR. For a file Windows cannot map (truncated, wrong machine, not a PE image) the system raises a modal "Bad Image" hard-error box, and LoadLibraryExW does not return until someone clicks OK. The loader reports that failure itself one line later, so the box only stalls it: gta6rt hangs on a headless machine, and loader_test, which writes such a file on purpose, waits for a click in every unattended ctest run. The load now runs with SEM_FAILCRITICALERRORS set on the calling thread, and the thread's previous error mode is restored afterwards. The Windows error code is read before the mode is put back. loader_test checks that the mode comes back unchanged, that the message still carries the error code, and that the refusal does not wait on a box. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions