mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: print fault addr in fatalsignal
Fixes #60894. Change-Id: I2e97c9ed527395303548bebe68ca7764e43132d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/504635 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
01987d3117
commit
c4af8abae1
1 changed files with 5 additions and 1 deletions
|
|
@ -788,7 +788,11 @@ func fatalsignal(sig uint32, c *sigctxt, gp *g, mp *m) *g {
|
|||
exit(2)
|
||||
}
|
||||
|
||||
print("PC=", hex(c.sigpc()), " m=", mp.id, " sigcode=", c.sigcode(), "\n")
|
||||
print("PC=", hex(c.sigpc()), " m=", mp.id, " sigcode=", c.sigcode())
|
||||
if sig == _SIGSEGV || sig == _SIGBUS {
|
||||
print(" addr=", hex(c.fault()))
|
||||
}
|
||||
print("\n")
|
||||
if mp.incgo && gp == mp.g0 && mp.curg != nil {
|
||||
print("signal arrived during cgo execution\n")
|
||||
// Switch to curg so that we get a traceback of the Go code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue