]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.garbage] all: merge default into dev.garbage
authorRuss Cox <rsc@golang.org>
Mon, 6 Oct 2014 18:18:56 +0000 (14:18 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 6 Oct 2014 18:18:56 +0000 (14:18 -0400)
This picks up the selectdone dangling pointer fix, among others.

LGTM=rlh
R=rlh
CC=golang-codereviews
https://golang.org/cl/153070045

1  2 
src/runtime/malloc.h
src/runtime/proc.c
src/runtime/proc.go
src/runtime/runtime.h
src/runtime/select.go

Simple merge
Simple merge
Simple merge
Simple merge
index 1bcea8c4b457a3e46558eeaee48a920e55b8be02,9de057b8711e78df10e90afa9f90bcb4abccebf1..2d0787bd96b9911f9e0dcd069e53035ef4b44c85
@@@ -377,8 -377,14 +377,9 @@@ loop
        // iterating through the linked list they are in reverse order.
        cas = nil
        sglist = gp.waiting
 -      // Clear all selectdone and elem before unlinking from gp.waiting.
 -      // They must be cleared before being put back into the sudog cache.
 -      // Clear before unlinking, because if a stack copy happens after the unlink,
 -      // they will not be updated, they will be left pointing to the old stack,
 -      // which creates dangling pointers, which may be detected by the
 -      // garbage collector.
 +      // Clear all elem before unlinking from gp.waiting.
        for sg1 := gp.waiting; sg1 != nil; sg1 = sg1.waitlink {
+               sg1.selectdone = nil
                sg1.elem = nil
        }
        gp.waiting = nil