[release-branch.go1.8] runtime: print user stack on other threads during GOTRACBEACK=crash
Currently, when printing tracebacks of other threads during GOTRACEBACK=crash, if the thread is on the system stack we print only the header for the user goroutine and fail to print its stack. This happens because we passed the g0 to traceback instead of curg. The g0 never has anything set in its gobuf, so traceback doesn't print anything. Fix this by passing _g_.m.curg to traceback instead of the g0. Fixes #19494. Fixes #19637 (backport). Change-Id: Idfabf94d6a725e9cdf94a3923dead6455ef3b217 Reviewed-on: https://go-review.googlesource.com/39600 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment