diff options
author | Russ Cox <rsc@golang.org> | 2015-11-20 14:02:33 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2015-11-20 19:55:27 +0000 |
commit | 7ab4cba9ad76f8853f11de1a72ff1db790c5ea61 (patch) | |
tree | 80a03de761b34e5dfa66c03fa73a5d727190d826 | |
parent | 2a6c7739b5bdb5fbaf743d89a18bd466fb178fe1 (diff) | |
download | go-7ab4cba9ad76f8853f11de1a72ff1db790c5ea61.tar.gz go-7ab4cba9ad76f8853f11de1a72ff1db790c5ea61.zip |
[release-branch.go1.5] runtime: fix new stack barrier check
During a crash showing goroutine stacks of all threads
(with GOTRACEBACK=crash), it can be that f == nil.
Only happens on Solaris; not sure why.
Change-Id: Iee2c394a0cf19fa0a24f6befbc70776b9e42d25a
Reviewed-on: https://go-review.googlesource.com/17110
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/17122
Reviewed-by: Russ Cox <rsc@golang.org>
-rw-r--r-- | src/runtime/traceback.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index aed6cbd694..8f27ba4d66 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -188,7 +188,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in } f := findfunc(frame.pc) - if f.entry == stackBarrierPC { + if f != nil && f.entry == stackBarrierPC { // We got caught in the middle of a stack barrier // (presumably by a signal), so stkbar may be // inconsistent with the barriers on the stack. |