1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

runtime: fix unwindstack crash

Bug and fix identified by Alexey Gokhberg.
Fixes #1135.

R=r, brainman
CC=golang-dev
https://golang.org/cl/2198046
This commit is contained in:
Russ Cox 2010-09-23 23:04:32 -04:00
parent e439345dfd
commit 34d413f562

View File

@ -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)) {