https://bugs.winehq.org/show_bug.cgi?id=55138
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 75738 --> https://bugs.winehq.org/attachment.cgi?id=75738 ntdll: Add read and write to new guard pages.
This makes also cygwin64 mintty silently fail to open the window.
It looks like cygwins child_info_fork::alloc_stack setups the stack with three guard pages. This pages end up with vprot bits 0x33 set (read,write,guard,committed). Below pages stay with having no vprot bits set.
The function grow_thread_stack seems to be able to grow the stack for these top three pages without problem. It is able to set vprot bit 0x30 to the next guard page (guard,committed).
Unfortunately on the next grow_thread_stack it changes the vprot bits to 0x20, and therefore get_unix_prot(0x20) returns prot=0, therefore the page looses its guard page status, but gets not committed. (mprotect is called with unix_prot=0)
Attached patch, adds always read,write to guard pages.