1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

ntdll: Respect red zone in usr1_handler() on x64.

Fixes a regression introduced by
efd3d31082.
This commit is contained in:
Paul Gofman 2024-03-04 19:54:54 -06:00 committed by Alexandre Julliard
parent c1b8db0c28
commit 6f55a13169

View file

@ -2152,7 +2152,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext )
ULONG64 saved_compaction = 0;
struct xcontext *context;
context = (struct xcontext *)(((ULONG_PTR)RSP_sig(ucontext) - sizeof(*context)) & ~15);
context = (struct xcontext *)(((ULONG_PTR)RSP_sig(ucontext) - 128 /* red zone */ - sizeof(*context)) & ~15);
if ((char *)context < (char *)ntdll_get_thread_data()->kernel_stack)
{
ERR_(seh)( "kernel stack overflow.\n" );