From 77354c39f9b9b35537951c4d98868b88214bf8dd Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Sat, 6 Apr 2013 20:00:45 -0700 Subject: [PATCH] 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 --- src/pkg/runtime/proc.c | 1 + 1 file changed, 1 insertion(+) 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. -- 2.50.0