[Bug 24018] Cygwin 1.7.6 installer crashes at start of postinstall

wine-bugs at winehq.org wine-bugs at winehq.org
Wed May 29 01:27:34 CDT 2013


http://bugs.winehq.org/show_bug.cgi?id=24018

Andrey Turkin <andrey.turkin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrey.turkin at gmail.com

--- Comment #9 from Andrey Turkin <andrey.turkin at gmail.com> 2013-05-29 01:27:34 CDT ---
--- snip ---
      char *st = (char *) stacktop - 4096;
      while (_tlstop >= st)
        stackp = getstack (stackp);
--- snip ---

This is a bug in Cygwin - this code is supposed to allocate stack to the same
limits as in parent thread, but it touches 2 extra pages. This is usually not a
problem in Windows where initial stack allocation is significantly less than
stack limit; Wine pre-allocates whole stack instead and there is no extra space
to go. This bug in Cygwin can be reproduced on Windows too with this program:

-----
int main(void) {
  while(!fork());
  return 0;
}
-----

It is supposed to be able to fork infinitely; on Cygwin it will fail rather
quickly.

Wine probably should emulate Windows behavior and allocate as much stack space
as requested by PE header; unfortunately, Windows approach (a single guard
page) is not an option because Wine code and *NIX libraries don't probe stack
pages.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list