aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/race.go
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2019-01-05 14:31:23 -0800
committerKeith Randall <khr@golang.org>2019-01-08 21:54:04 +0000
commit956879dd0bf31b26d2425c2eadbeb19b90812187 (patch)
tree7d4bb468334d274917f03a783d7d3441e7478c1e /src/runtime/race.go
parent033b6501817aefebc6fc56b6212ff6abf14c8127 (diff)
downloadgo-956879dd0bf31b26d2425c2eadbeb19b90812187.tar.gz
go-956879dd0bf31b26d2425c2eadbeb19b90812187.zip
runtime: make FuncForPC return the innermost inlined frame
Returning the innermost frame instead of the outermost makes code that walks the results of runtime.Caller{,s} still work correctly in the presence of mid-stack inlining. Fixes #29582 Change-Id: I2392e3dd5636eb8c6f58620a61cef2194fe660a7 Reviewed-on: https://go-review.googlesource.com/c/156364 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/race.go')
-rw-r--r--src/runtime/race.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/race.go b/src/runtime/race.go
index 08d53a10d2..adb2198c55 100644
--- a/src/runtime/race.go
+++ b/src/runtime/race.go
@@ -156,7 +156,7 @@ func racecallback(cmd uintptr, ctx unsafe.Pointer) {
}
func raceSymbolizeCode(ctx *symbolizeCodeContext) {
- f := FuncForPC(ctx.pc)
+ f := findfunc(ctx.pc)._Func()
if f != nil {
file, line := f.FileLine(ctx.pc)
if line != 0 {