Subject: lib/37169: libpthread doesn't support PTHREAD_STACK_MIN
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <degroote@netbsd.org>
List: netbsd-bugs
Date: 10/21/2007 23:00:01
>Number:         37169
>Category:       lib
>Synopsis:       libpthread doesn't support PTHREAD_STACK_MIN
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 21 23:00:01 +0000 2007
>Originator:     Arnaud Degroote
>Release:        current
>Organization:
>Environment:
NetBSD Amilo.at.home 4.99.34 NetBSD 4.99.34 (AMILO) #4: Sat Oct 20 11:55:49 CEST 2007  zul@Amilo.at.home:/home/zul/netbsd-dev/build_temp/objdir/sys/arch/i386/compile/AMILO i386

>Description:
>From the single unix specification,

limits.h need to define PTHREAD_STACK_MIN as :

 Minimum size in bytes of thread stack storage. 
 Minimum Acceptable  Value: 0

and 

  pthread_set_stacksize must check its argument agains this value. If it is lesser, the function must return EINVAL

Our current implementation doesn't respect this behaviour (particulary it doesn't expose PTHREAD_STACK_MIN).
>How-To-Repeat:
Code reading 
(spotted trying to compile YARV (Yet Another Ruby VM))
>Fix: