]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix test for new closure representation
authorDmitriy Vyukov <dvyukov@google.com>
Mon, 17 Jun 2013 11:41:17 +0000 (15:41 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Mon, 17 Jun 2013 11:41:17 +0000 (15:41 +0400)
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

src/pkg/runtime/stack_test.go

index da0181a66e60cdbe22ee6795b3a22869aed1aba2..00c2d0e061d5655994e1376a09fbff68e3dc243d 100644 (file)
@@ -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)
                }