mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 23:00:44 +02:00
Fixes crash in thunks that use callbacks, introduced in #5148. The dispatcher would call the syscallhandler to get the VDSO thunk callback. But due to reordering initialization, the VDSO thunk would have not been loaded at that point. This would cause thunks that use callbacks to crash with a nullptr exception. Instead, defer the thunk callback pointer loading until the thread starts executing, and load the pointer in to our thread state's pointer struct instead. Didn't get caught in my initial test sweep since I didn't run a Wine game with thunks.