From: Dmitriy Vyukov Date: Sun, 7 Apr 2013 03:01:28 +0000 (-0700) Subject: runtime: reset dangling typed pointer X-Git-Tag: go1.1rc2~162 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=54340bf56fb4b29ea175d85cff4ba765a60961b6;p=gostls13.git runtime: reset dangling typed pointer +untype it because it can point to different types Update #5193. R=golang-dev, iant CC=golang-dev https://golang.org/cl/8454043 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 438de78b09..0a131871f3 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -1178,6 +1178,7 @@ park0(G *gp) if(m->waitunlockf) { m->waitunlockf(m->waitlock); m->waitunlockf = nil; + m->waitlock = nil; } if(m->lockedg) { stoplockedm(); diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 864b2aa5f7..bafad35122 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -317,7 +317,7 @@ struct M bool needextram; void* racepc; void (*waitunlockf)(Lock*); - Lock* waitlock; + void* waitlock; uint32 moreframesize_minalloc; uintptr settype_buf[1024];