Piotr Caban piotr.caban@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?