From: Thanabodee Charoenpiriyakij Date: Thu, 19 Jul 2018 01:16:44 +0000 (+0700) Subject: runtime: remove +1-1 when asking PC values X-Git-Tag: go1.12beta1~1324 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=68527ff4fb32c98b1f15367c65c526c2b2b3a57a;p=gostls13.git runtime: remove +1-1 when asking PC values Fixes #26437 Change-Id: Id47b3bcc23ea7b7b17b55dd96b5830c48fd8d53d Reviewed-on: https://go-review.googlesource.com/124895 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/extern.go b/src/runtime/extern.go index 2788bd354b..1773c8fe7e 100644 --- a/src/runtime/extern.go +++ b/src/runtime/extern.go @@ -176,7 +176,7 @@ func Caller(skip int) (pc uintptr, file string, line int, ok bool) { // what it called, so that CallersFrames can see if it "called" // sigpanic, and possibly a PC for skipPleaseUseCallersFrames. var rpc [3]uintptr - if callers(1+skip-1, rpc[:]) < 2 { + if callers(skip, rpc[:]) < 2 { return } var stackExpander stackExpander