diff options
author | Russ Cox <rsc@golang.org> | 2014-10-06 14:18:56 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-06 14:18:56 -0400 |
commit | f85d9767d353a27de22f648b7bc6312b040c0c4e (patch) | |
tree | 971e90a40a6077dc8bf67af779094b71beca0e70 /src/runtime/select.go | |
parent | d1c93b1e5501a8117a68988334ae450b7d96e49f (diff) | |
parent | c5aca6fedbdd83d9153f6a00dc656aaabb0774c5 (diff) | |
download | go-f85d9767d353a27de22f648b7bc6312b040c0c4e.tar.gz |
[dev.garbage] all: merge default into dev.garbage
This picks up the selectdone dangling pointer fix, among others.
LGTM=rlh
R=rlh
CC=golang-codereviews
https://codereview.appspot.com/153070045
Diffstat (limited to 'src/runtime/select.go')
-rw-r--r-- | src/runtime/select.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/runtime/select.go b/src/runtime/select.go index 9de057b87..2d0787bd9 100644 --- a/src/runtime/select.go +++ b/src/runtime/select.go @@ -377,12 +377,7 @@ 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 |