Opened 7 years ago

Closed 7 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:
Has a Patch: yes 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


Patch to follow.

Attachments (1)

0001-getrlimit-with-RLIMIT_STACK-now-returns-USER_MAIN_TH.patch (894 bytes) - added by edglex 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by edglex

Has a Patch: set

comment:2 Changed 7 years ago by anevilyak

Owner: changed from nobody to bonefish
Status: newassigned
Version: R1/alpha3R1/Development

comment:3 Changed 7 years ago by bonefish

The patch looks OK. Not sure when I get around to apply it. So, if anyone wants to beat me to it...

comment:4 Changed 7 years ago by anevilyak

Resolution: fixed
Status: assignedclosed

Applied in hrev44581. Thanks!

Note: See TracTickets for help on using tickets.