diff options
| author | Keith Randall <khr@golang.org> | 2020-06-25 09:10:23 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2020-08-17 21:57:05 +0000 |
| commit | 88c094c96a164aef2134e548d495c4bc14dc4687 (patch) | |
| tree | 78d45873aa7e116606e38d3838ad944c3682355c /src | |
| parent | ba97be4b58241bebbc4ff70574bd82152ab19ffe (diff) | |
| download | go-88c094c96a164aef2134e548d495c4bc14dc4687.tar.xz | |
runtime: print faulting instruction on a SIGFPE
Just like SIGILL, it might be useful to see what the instruction
that generated the SIGFPE is.
Update #39816
Change-Id: I8b2ff692998f0b770289339537dceab96b09d1ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/239999
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/signal_unix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index dd6d79f8ec..6a11c91fb9 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -616,7 +616,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) { print("signal arrived during cgo execution\n") gp = _g_.m.lockedg.ptr() } - if sig == _SIGILL { + if sig == _SIGILL || sig == _SIGFPE { // It would be nice to know how long the instruction is. // Unfortunately, that's complicated to do in general (mostly for x86 // and s930x, but other archs have non-standard instruction lengths also). |
