aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-02-25 19:16:18 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-02-25 18:57:28 +0000
commitdb44223fde80485132f477a51b690d5d54dad56e (patch)
treef9a28cc051dc896f8f96f7df96188b6e1ea32f7e /src/runtime/string.go
parent30f93f09944c54147bec9e5c39631f17addd94c7 (diff)
downloadgo-db44223fde80485132f477a51b690d5d54dad56e.tar.xz
runtime: fix getcallerpc args
Change-Id: I6b14b8eecf125dd74bd40f4e7fff6b49de150e42 Reviewed-on: https://go-review.googlesource.com/19897 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/string.go')
-rw-r--r--src/runtime/string.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go
index dd04bda04b..5dc7e0295a 100644
--- a/src/runtime/string.go
+++ b/src/runtime/string.go
@@ -84,7 +84,7 @@ func slicebytetostring(buf *tmpBuf, b []byte) string {
if raceenabled && l > 0 {
racereadrangepc(unsafe.Pointer(&b[0]),
uintptr(l),
- getcallerpc(unsafe.Pointer(&b)),
+ getcallerpc(unsafe.Pointer(&buf)),
funcPC(slicebytetostring))
}
if msanenabled && l > 0 {
@@ -189,7 +189,7 @@ func slicerunetostring(buf *tmpBuf, a []rune) string {
if raceenabled && len(a) > 0 {
racereadrangepc(unsafe.Pointer(&a[0]),
uintptr(len(a))*unsafe.Sizeof(a[0]),
- getcallerpc(unsafe.Pointer(&a)),
+ getcallerpc(unsafe.Pointer(&buf)),
funcPC(slicerunetostring))
}
if msanenabled && len(a) > 0 {