-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
We have a build setting called DEFAULT_PTHREAD_STACK_SIZE (default to 2Mb) which kicks in when a thread is created without any attributes.
However if one create a default set of attributes using pthread_attr_init musl will configure it with its own internal default which is 80k:
| #define DEFAULT_STACK_SIZE 81920 |
Possible solutions:
- Have musl call back out the JS to know the actual default desired by the user (not know at libc compile time)
- Remove
DEFAULT_PTHREAD_STACK_SIZEand users who want a custom stack size can do so programmatically usingpthread_attr_setstacksize - Set musl's
DEFAULT_STACK_SIZEto match the defaultDEFAULT_PTHREAD_STACK_SIZEso most users will never notice (only users who overrideDEFAULT_PTHREAD_STACK_SIZEwould see this behaviour).
(3) is the safest thing to do right away which will fix at least one know issue I found in the lsan codebase.
Metadata
Metadata
Assignees
Labels
No labels