]> 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>
Wed, 7 Jan 2015 15:50:56 +0000 (18:50 +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 1f006e4778926403f97db55e37885b8f236ee6ce..446a6b88370d1031c434e4fccef64d3de155cf3a 100644 (file)
@@ -1881,7 +1881,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;
         }