Opened 12 years ago
Closed 12 years ago
#8912 closed bug (fixed)
getrlimit with RLIMIT_STACK should return USER_MAIN_THREAD_STACK_SIZE
Reported by: | edglex | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
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.
Attachments (1)
Change History (5)
by , 12 years ago
Attachment: | 0001-getrlimit-with-RLIMIT_STACK-now-returns-USER_MAIN_TH.patch added |
---|
comment:1 by , 12 years ago
patch: | 0 → 1 |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Version: | R1/alpha3 → R1/Development |
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Applied in hrev44581. Thanks!
Note:
See TracTickets
for help on using tickets.
The patch looks OK. Not sure when I get around to apply it. So, if anyone wants to beat me to it...