From 25b46da17fbc9c92f580460df09029d54b841f7b Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 17 Mar 2017 10:39:57 +0300 Subject: [PATCH] Fix gctest thread stack overflow (musl-gcc) (Cherry-pick commits 3bfeb8a, 21b68ca from 'master' branch.) * tests/test.c (BIG): Remove commented out defined(MSWIN32); define to 1000 if NO_GETCONTEXT (and UNIX_LIKE); update comment. --- tests/test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test.c b/tests/test.c index 9b582fac..6ca22e05 100644 --- a/tests/test.c +++ b/tests/test.c @@ -580,8 +580,9 @@ void *GC_CALLBACK reverse_test_inner(void *data) return GC_call_with_gc_active(reverse_test_inner, (void*)(word)1); } -# if /*defined(MSWIN32) ||*/ defined(MACOS) - /* Win32S only allows 128K stacks */ +# if defined(MACOS) \ + || (defined(UNIX_LIKE) && defined(NO_GETCONTEXT)) /* e.g. musl */ + /* Assume 128K stacks at least. */ # define BIG 1000 # elif defined(PCR) /* PCR default stack is 100K. Stack frames are up to 120 bytes. */ -- 2.40.0