From: Russ Cox Date: Fri, 24 Sep 2010 03:04:32 +0000 (-0400) Subject: runtime: fix unwindstack crash X-Git-Tag: weekly.2010-09-29~68 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=34d413f562fb4de78a8ea84ec3fed252c3667820;p=gostls13.git runtime: fix unwindstack crash Bug and fix identified by Alexey Gokhberg. Fixes #1135. R=r, brainman CC=golang-dev https://golang.org/cl/2198046 --- diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 1d1b05969c..9483e4c290 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -956,7 +956,8 @@ unwindstack(G *gp, byte *sp) break; gp->stackbase = top->stackbase; gp->stackguard = top->stackguard; - free(stk); + if(top->free) + stackfree(stk); } if(sp != nil && (sp < gp->stackguard - StackGuard || gp->stackbase < sp)) {