This libgo patch from Gabriel Russell reportedly fixes a deadlock in
the Go scheduler on PPC.  This fixes https://golang.org/issue/15051 .
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 234304)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-3de822d11255d439fac9717897b017aae2de18c2
+8edf085a94579bd819a10f50328233812ceeb950
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/runtime/proc.c
===================================================================
--- libgo/runtime/proc.c        (revision 234304)
+++ libgo/runtime/proc.c        (working copy)
@@ -2042,7 +2042,7 @@ doentersyscall()
        m->mcache = nil;
        m->p->m = nil;
        runtime_atomicstore(&m->p->status, Psyscall);
-       if(runtime_sched.gcwaiting) {
+       if(runtime_atomicload(&runtime_sched.gcwaiting)) {
                runtime_lock(&runtime_sched);
                if (runtime_sched.stopwait > 0 && runtime_cas(&m->p->status, 
Psyscall, Pgcstop)) {
                        if(--runtime_sched.stopwait == 0)

Reply via email to