From: Dmitriy Vyukov Date: Mon, 17 Jun 2013 11:41:17 +0000 (+0400) Subject: runtime: fix test for new closure representation X-Git-Tag: go1.2rc2~1237 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f84cbd0950bd05209df7a18e79c1be6b3d31811a;p=gostls13.git runtime: fix test for new closure representation I've hit it several times already. Currently it crashes with nil deref. R=golang-dev, daniel.morsing, r CC=golang-dev https://golang.org/cl/10317045 --- diff --git a/src/pkg/runtime/stack_test.go b/src/pkg/runtime/stack_test.go index da0181a66e..00c2d0e061 100644 --- a/src/pkg/runtime/stack_test.go +++ b/src/pkg/runtime/stack_test.go @@ -49,7 +49,7 @@ func TestStackSplit(t *testing.T) { sp, guard := f() bottom := guard - StackGuard if sp < bottom+StackLimit { - fun := FuncForPC(*(*uintptr)(unsafe.Pointer(&f))) + fun := FuncForPC(**(**uintptr)(unsafe.Pointer(&f))) t.Errorf("after %s: sp=%#x < limit=%#x (guard=%#x, bottom=%#x)", fun.Name(), sp, bottom+StackLimit, guard, bottom) }