Actions
Bug #3234
closedpthread - Respect RLIMIT_STACK for main thread
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Feature request
Target version:
-
Start date:
04/25/2020
Due date:
% Done:
0%
Estimated time:
Description
The stack size of the main thread when pthread is used is limited to 4 MB (hard coded value).
This breaks, for example, the crystal compiler (www.crystal-lang.org).
The stack size of a process not using pthread is limited by RLIMIT_STACK. As soon as pthread is linked in,
the main thread's stack size is limited to 4 MB.
FreeBSD uses two environment variables LIBPTHREAD_BIGSTACK_MAIN and
LIBPTHREAD_SPLITSTACK_MAIN to control use of RLIMIT_STACK vs. the hard-coded
4MB and defaults to respect RLIMIT_STACK when none is specified.
This patch
https://leaf.dragonflybsd.org/~mneumann/patch-libthread_xu.diff
fixes the issue. Crystal compiles.
Files
Updated by mneumann over 4 years ago
- Status changed from New to Resolved
Fixed in commit 4b29dd4bf14ecfcbe53cbc16a3a96e433c70d7fc
Actions