Commit 6b2c9505 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ntdll: Restore stack guard and prevent stack from shrinking.

parent 6990ecaa
......@@ -1618,8 +1618,12 @@ BOOL virtual_handle_stack_fault( void *addr )
if (vprot & VPROT_GUARD)
{
VIRTUAL_SetProt( view, page, page_size, vprot & ~VPROT_GUARD );
if ((char *)page + page_size == NtCurrentTeb()->Tib.StackLimit)
NtCurrentTeb()->Tib.StackLimit = page;
NtCurrentTeb()->Tib.StackLimit = page;
if ((char *)page >= (char *)NtCurrentTeb()->DeallocationStack + 2*page_size)
{
vprot = view->prot[((char *)page - page_size - (char *)view->base) >> page_shift];
VIRTUAL_SetProt( view, (char *)page - page_size, page_size, vprot | VPROT_GUARD );
}
ret = TRUE;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment