#8912: getrlimit with RLIMIT_STACK should return USER_MAIN_THREAD_STACK_SIZE --------------------------+------------------------- Reporter: edglex | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/POSIX | Version: R1/alpha3 Keywords: | Blocked By: Blocking: | Has a Patch: 0 Platform: All | --------------------------+------------------------- The value returned from getrlimit with RLIMIT_STACK includes the guard pages and TLS area, but in pthread_attr_setstacksize the max stack size is MAX_USER_STACK_SIZE. Calling pthread_attr_setstacksize with the value returned from getrlimit thus fails. According to posix, getrlimit should return the maximum size of the initial thread's stack http://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html i.e. USER_MAIN_THREAD_STACK_SIZE (which is the same as MAX_USER_STACK_SIZE). Patch to follow. -- Ticket URL: <http://dev.haiku-os.org/ticket/8912> Haiku <http://dev.haiku-os.org> Haiku - the operating system.