This libgo patch tweaks the CgoCallbackGC test to allocate more stack
space.  This makes it more likely to succeed on a system that does not
support split stacks.  This test is actually not very meaningful for
gccgo at present, but it doesn't hurt to keep running it.
Bootstrapped and ran Go tests on x86_64-pc-linux-gnu and
powerpc64le-unknown-linux-gnu.  Committed to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 250406)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-6572f7e35f962bdb8a7c174920dbb70350b96874
+e34cb8dee6c1f215329e0eea79202b48cb83817c
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/runtime/testdata/testprogcgo/callback.go
===================================================================
--- libgo/go/runtime/testdata/testprogcgo/callback.go   (revision 250406)
+++ libgo/go/runtime/testdata/testprogcgo/callback.go   (working copy)
@@ -23,7 +23,9 @@ static void foo() {
     pthread_t th;
     pthread_attr_t attr;
     pthread_attr_init(&attr);
-    pthread_attr_setstacksize(&attr, 256 << 10);
+    // For gccgo use a stack size large enough for all the callbacks,
+    // in case we are on a platform that does not support -fsplit-stack.
+    pthread_attr_setstacksize(&attr, 512 * 10000);
     pthread_create(&th, &attr, thr, 0);
     pthread_join(th, 0);
 }

Reply via email to