increase default thread stack/guard size

stack size default is increased from 80k to 128k. this coincides with
Linux's hard-coded default stack for the main thread (128k is
initially committed; growth beyond that up to ulimit is contingent on
additional allocation succeeding) and GNU ld's default PT_GNU_STACK
size for FDPIC, at least on sh.

guard size default is increased from 4k to 8k to reduce the risk of
guard page jumping on overflow, since use of just over 4k of stack is
common (PATH_MAX buffers, etc.).
This commit is contained in:
Rich Felker 2018-09-18 23:11:49 -04:00
parent 792f32772e
commit c0058ab465
1 changed files with 2 additions and 2 deletions

View File

@ -185,8 +185,8 @@ hidden void __inhibit_ptc(void);
extern hidden unsigned __default_stacksize;
extern hidden unsigned __default_guardsize;
#define DEFAULT_STACK_SIZE 81920
#define DEFAULT_GUARD_SIZE 4096
#define DEFAULT_STACK_SIZE 131072
#define DEFAULT_GUARD_SIZE 8192
#define DEFAULT_STACK_MAX (8<<20)
#define DEFAULT_GUARD_MAX (1<<20)