mirror of
https://github.com/golang/go
synced 2024-11-18 15:44:41 -07: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
@ -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…
Reference in New Issue
Block a user