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

Piotr Caban piotr.caban at gmail.com
Thu Apr 7 04:16:00 CDT 2011

On 04/07/11 11:00, Alexandre Julliard wrote:
> Piotr Caban<piotr.caban at gmail.com>  writes:
>> It's not needed (I thought it may be not valid for whole stack). I'll
>> send fixed version.
>> There also should be "growing" instead of "shrinking" in commit
>> message. It was meant to point that it's possible to change StackLimit
>> more then once without this patch.
> I'm not sure what you mean, making it grow is the reason for that
> function.
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.

More information about the wine-devel mailing list