From 54340bf56fb4b29ea175d85cff4ba765a60961b6 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Sat, 6 Apr 2013 20:01:28 -0700 Subject: [PATCH] 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 --- src/pkg/runtime/proc.c | 1 + src/pkg/runtime/runtime.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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]; -- 2.50.0