[PATCH 1/2] ntdll: Restore stack guard and prevent stack from shrinking

Alexandre Julliard julliard at winehq.org
Thu Apr 7 04:22:42 CDT 2011

Piotr Caban <piotr.caban at gmail.com> writes:

> Without this patch there's following condition for stack growing:
> if ((char *)page + page_size == NtCurrentTeb()->Tib.StackLimit)
> 	NtCurrentTeb()->Tib.StackLimit = page;
> If after growing the stack application protects the memory between
> StackLimit and StackLimit-page_size, StackLimit will be changed again.

StackLimit is supposed to be the last address that is unprotected, so
changing it in that case would be correct. The last page should really
to remain protected though, which application is modifying it?

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list