-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
threads: Retrieve default stack size from __heap_base/__data_end (#350)
When compiling with `-z stack-size` flag, only the main thread's stack size is set to the specified value and other threads use musl's default value. That's inconsistent with LLD's `-Wl,-stack_size`. I think we can make it similar to MUSL's behavior, where thread's stack size can be set via `PT_GNU_STACK` program header (via `-Wl,-z,stack-size` flag). Configuring stack size through `pthread_attr_t` still work as expected and overrides the defaults ([pthread_create.c](https://github.com/WebAssembly/wasi-libc/blob/be1ffd6a9eba1704085987482557c2a32724227f/libc-top-half/musl/src/thread/pthread_create.c#L362)) default settings.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters