From 048f0471d203ae4ce74af80b32e4b40ec1d1f1f6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 21 Jul 2017 17:50:14 +0000 Subject: [PATCH] runtime: allocate more stack space in CgoCallbackGC test Allocate enough stack space so that the test will work 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. Updates golang/go#20931 Reviewed-on: https://go-review.googlesource.com/50630 From-SVN: r250433 --- gcc/go/gofrontend/MERGE | 2 +- libgo/go/runtime/testdata/testprogcgo/callback.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5f624b4b795..364312f2202 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/go/runtime/testdata/testprogcgo/callback.go b/libgo/go/runtime/testdata/testprogcgo/callback.go index 7b58f4a207e..a49fc19b284 100644 --- a/libgo/go/runtime/testdata/testprogcgo/callback.go +++ b/libgo/go/runtime/testdata/testprogcgo/callback.go @@ -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); } -- 2.30.2