On 04/07/11 11:22, Alexandre Julliard wrote:
Piotr Cabanpiotr.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?
It happens when native _resetstkoflw is called when there's little memory left on the stack. I don't know if there's any real application that is calling it in that case. I thought that it's incorrect to grow the stack size above stack limit anyway.