The default stack size of threads in musl is not large enough for
GC with parallel markers enabled. This commit increases the stack
of the created threads to the required minimum.
* include/private/gcconfig.h [PARALLEL_MARK && (HPUX
|| GC_DGUX386_THREADS || NO_GETCONTEXT)] (DEFAULT_STACK_MAYBE_SMALL):
New macro; add TODO item.
* include/private/gcconfig.h [PARALLEL_MARK || THREADS] (MIN_STACK_SIZE):
New macro.
* pthread_support.c (MIN_STACK_SIZE): Do not define.
* pthread_support.c (GC_start_mark_threads_inner): Check
DEFAULT_STACK_MAYBE_SMALL macro instead of HPUX or GC_DGUX386_THREADS.
* pthread_support.c [DEFAULT_STACK_MAYBE_SMALL]
(GC_start_mark_threads_inner): Do not set stack size if old_size is 0.
* pthread_support.c [GC_ASSERTIONS] (WRAP_FUNC(pthread_create)): Use
MIN_STACK_SIZE in GC_ASSERT.
* tests/test.c [GC_PTHREADS && DEFAULT_STACK_MAYBE_SMALL]
(fork_a_thread): Set stack size of the created thread to MIN_STACK_SIZE.
* tests/test.c [GC_PTHREADS] (main): Set size of the created thread
also if DEFAULT_STACK_MAYBE_SMALL is defined.