]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove +1-1 when asking PC values
authorThanabodee Charoenpiriyakij <wingyminus@gmail.com>
Thu, 19 Jul 2018 01:16:44 +0000 (08:16 +0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 22 Aug 2018 19:47:44 +0000 (19:47 +0000)
Fixes #26437

Change-Id: Id47b3bcc23ea7b7b17b55dd96b5830c48fd8d53d
Reviewed-on: https://go-review.googlesource.com/124895
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/extern.go

index 2788bd354b16c4aa57e8c0fa9c94224a1af3f07d..1773c8fe7ebe461bbbbb9c44bc69885d0dafde9b 100644 (file)
@@ -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