]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: reset dangling typed pointer
authorDmitriy Vyukov <dvyukov@google.com>
Sun, 7 Apr 2013 03:01:28 +0000 (20:01 -0700)
committerDmitriy Vyukov <dvyukov@google.com>
Sun, 7 Apr 2013 03:01:28 +0000 (20:01 -0700)
+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
src/pkg/runtime/runtime.h

index 438de78b09d5066f63b2a8147aff58eba1b05cce..0a131871f3c35fe1b63d0e452ad13ed7f4b06cc5 100644 (file)
@@ -1178,6 +1178,7 @@ park0(G *gp)
        if(m->waitunlockf) {
                m->waitunlockf(m->waitlock);
                m->waitunlockf = nil;
+               m->waitlock = nil;
        }
        if(m->lockedg) {
                stoplockedm();
index 864b2aa5f7de463cfa8192e45bddd56630c4737f..bafad351224bdf6af30106bdff5b7eb572914a7c 100644 (file)
@@ -317,7 +317,7 @@ struct      M
        bool    needextram;
        void*   racepc;
        void    (*waitunlockf)(Lock*);
-       Lock*   waitlock;
+       void*   waitlock;
        uint32  moreframesize_minalloc;
 
        uintptr settype_buf[1024];