]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix arg to getcallerpc
authorKeith Randall <khr@golang.org>
Tue, 12 Apr 2016 23:25:48 +0000 (16:25 -0700)
committerKeith Randall <khr@golang.org>
Wed, 13 Apr 2016 00:24:38 +0000 (00:24 +0000)
getcallerpc's arg needs to point to the first argument slot.
I believe this bug was introduced by Michel's itab changes
(specifically https://go-review.googlesource.com/c/20902).

Fixes #15145

Change-Id: Ifb2e17f3658e2136c7950dfc789b4d5706320683
Reviewed-on: https://go-review.googlesource.com/21931
Reviewed-by: Michel Lespinasse <walken@google.com>
src/runtime/iface.go

index 3ce1e237d35535fab91d6f3fa4631e44f9e442eb..a4c962fb7a4978dbd9dc8b393c63e6cd0dccd3e3 100644 (file)
@@ -173,7 +173,7 @@ func convT2E(t *_type, elem unsafe.Pointer, x unsafe.Pointer) (e eface) {
 func convT2I(tab *itab, elem unsafe.Pointer, x unsafe.Pointer) (i iface) {
        t := tab._type
        if raceenabled {
-               raceReadObjectPC(t, elem, getcallerpc(unsafe.Pointer(&t)), funcPC(convT2I))
+               raceReadObjectPC(t, elem, getcallerpc(unsafe.Pointer(&tab)), funcPC(convT2I))
        }
        if msanenabled {
                msanread(elem, t.size)