You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This thread (named "nvwgf2umx!NVDEV_Thunk") has a stack size of 61440. Our `entrypoint` function in
`src/entrypoint.zig` allocates more than this on the stack. This becomes
a problem when it is inlined into `DllMain`. Even though the
`DllMain` function will return before calling the `entrypoint` function
when called with `fdwReason != .PROCESS_ATTACH`, when inlining
`entrypoint`, the compiler includes entrypoint's stack usage in the stack
checks inserted at the beginning of the `DllMain` function. The result
is that in optimized builds, or at least those with stack checks
(`ReleaseSafe` only?), the NVIDIA driver thread with a tiny stack will
call our `DllMain` function and immediately abort due to stack overflow.
The fix is simple: do not ever inline the `entrypoint` function into the
`DllMain` function.
0 commit comments