]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: make FuncForPC return the innermost inlined frame
authorKeith Randall <keithr@alum.mit.edu>
Sat, 5 Jan 2019 22:31:23 +0000 (14:31 -0800)
committerKeith Randall <khr@golang.org>
Tue, 8 Jan 2019 21:54:04 +0000 (21:54 +0000)
commit956879dd0bf31b26d2425c2eadbeb19b90812187
tree7d4bb468334d274917f03a783d7d3441e7478c1e
parent033b6501817aefebc6fc56b6212ff6abf14c8127
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>
src/runtime/race.go
src/runtime/runtime2.go
src/runtime/symtab.go
test/inline_caller.go
test/inline_callers.go