]> granicus.if.org Git - gc/commitdiff
Fix OSX issue with pthread_attr_setstacksize failure
authorBruce Hoult <bruce@hoult.org>
Sun, 4 Jan 2015 15:33:35 +0000 (04:33 +1300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 12 May 2015 21:16:10 +0000 (00:16 +0300)
(bug introduced in commit 7bef74b)

* tests/test.c (main): Set stack size to 1000 KiB instead of
1000000 bytes (to avoid pthread_attr_setstacksize failure with
"stacksize is not a multiple of the system page size" error on
Darwin)

tests/test.c

index 8d0acb4c756ac150d69153cf86e33150b635790c..9f3afa4a0eee7419fcbd4cc4fe2e84dabd32a09f 100644 (file)
@@ -1859,7 +1859,7 @@ int main(void)
 #   if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \
         || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
         || defined(GC_OPENBSD_THREADS)
-        if ((code = pthread_attr_setstacksize(&attr, 1000000)) != 0) {
+        if ((code = pthread_attr_setstacksize(&attr, 1000 * 1024)) != 0) {
           GC_printf("pthread_attr_setstacksize failed, error=%d\n", code);
           FAIL;
         }