Commit 7ab4cba9 authored by Russ Cox's avatar Russ Cox Committed by Austin Clements

[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/17110Reviewed-by: default avatarAustin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/17122Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 2a6c7739
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment