diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9c1839d58c2..c13c10dd953 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -314ba28067383516c213ba84c931f93325a48c39 +0a49b1dadd862215bdd38b9725a6e193b0d8fd0b The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 9838c7f7635..a9f3b837334 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -283,6 +283,9 @@ runtime_mcall(void (*pfn)(G*)) { M *mp; G *gp; +#ifndef USING_SPLIT_STACK + void *afterregs; +#endif // Ensure that all registers are on the stack for the garbage // collector. @@ -298,7 +301,9 @@ runtime_mcall(void (*pfn)(G*)) #ifdef USING_SPLIT_STACK __splitstack_getcontext(&g->stackcontext[0]); #else - gp->gcnextsp = &pfn; + // We have to point to an address on the stack that is + // below the saved registers. + gp->gcnextsp = &afterregs; #endif gp->fromgogo = false; getcontext(ucontext_arg(&gp->context[0]));