In the NPTL implementation, the guard area (as set by pthread_attr_setguardsize()) is included in (i.e., deducted from) the stack allocation. Common sense says that it should be added to the allocation, and indeed POSIX.1-2001 and POSIX.1-2008 are clear on this point; from the specification 2008 pthread_attr_setguardsize(): "If a thread’s stack is created with guard protection, the implementation allocates extra memory at the overflow end of the stack as a buffer against stack overflow of the stack pointer." Solaris adheres to POSIX.1 on this point. NPTL should also.
We're looking to fix this with bug 11787. Closing this as duplicate. *** This bug has been marked as a duplicate of bug 11787 ***