1
0
mirror of https://github.com/golang/go synced 2024-10-03 08:21:21 -06:00

runtime: zero dangling pointer

I don't see how it can lead to bad things today.
But it's better to kill it before it does.

LGTM=khr
R=golang-codereviews, khr
CC=golang-codereviews, rsc
https://golang.org/cl/111130045
This commit is contained in:
Dmitriy Vyukov 2014-07-15 10:27:36 +04:00
parent 0a5cb7dc49
commit 8422d1ea65

View File

@ -1105,6 +1105,8 @@ loop:
if(sgp == nil)
return nil;
q->first = sgp->link;
if(q->last == sgp)
q->last = nil;
// if sgp participates in a select and is already signaled, ignore it
if(sgp->selectdone != nil) {