From: Dmitriy Vyukov Date: Sun, 7 Apr 2013 03:00:45 +0000 (-0700) Subject: runtime: reset typed dangling pointer X-Git-Tag: go1.1rc2~163 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=77354c39f9b9b35537951c4d98868b88214bf8dd;p=gostls13.git runtime: reset typed dangling pointer If for whatever reason seh points into Go heap region, the dangling pointer will cause memory corruption during GC. Update #5193. R=golang-dev, alex.brainman, iant CC=golang-dev https://golang.org/cl/8402045 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index eec7531e15..438de78b09 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -695,6 +695,7 @@ runtime·dropm(void) // Undo whatever initialization minit did during needm. runtime·unminit(); + m->seh = nil; // reset dangling typed pointer // Clear m and g, and return m to the extra list. // After the call to setmg we can only call nosplit functions.