190-nptl_use_arch_default_stack_limit.patch 546 B

12345678910111213
  1. --- a/libpthread/nptl/init.c
  2. +++ b/libpthread/nptl/init.c
  3. @@ -402,6 +402,10 @@ __pthread_initialize_minimal_internal (v
  4. Use the minimal size acceptable. */
  5. limit.rlim_cur = PTHREAD_STACK_MIN;
  6. + /* Do not exceed architecture specific default */
  7. + if (limit.rlim_cur > ARCH_STACK_DEFAULT_SIZE)
  8. + limit.rlim_cur = ARCH_STACK_DEFAULT_SIZE;
  9. +
  10. /* Make sure it meets the minimum size that allocate_stack
  11. (allocatestack.c) will demand, which depends on the page size. */
  12. const uintptr_t pagesz = sysconf (_SC_PAGESIZE);