]> granicus.if.org Git - gc/commit
Fix gctest failure if PARALLEL_MARK (musl)
authorPeter Wang <novalazy@gmail.com>
Thu, 22 Jun 2017 21:25:41 +0000 (00:25 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 22 Jun 2017 21:25:41 +0000 (00:25 +0300)
commitf9d14196a34a47b09de5ee51feeadd6aea9d96cc
treeded16535a0d510920266588fd4a4baca812b8b05
parentb570a84bc34a21577d25e4dbe77d28b8809f15c4
Fix gctest failure if PARALLEL_MARK (musl)

Issue #159 (bdwgc).

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.
include/private/gcconfig.h
pthread_support.c
tests/test.c