diff options
Diffstat (limited to 'src/runtime/panic.go')
| -rw-r--r-- | src/runtime/panic.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 0823f11e98..4cb6c8a360 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -561,6 +561,12 @@ func deferreturn(arg0 uintptr) { d.fn = nil gp._defer = d.link freedefer(d) + // If the defer function pointer is nil, force the seg fault to happen + // here rather than in jmpdefer. gentraceback() throws an error if it is + // called with a callback on an LR architecture and jmpdefer is on the + // stack, because the stack trace can be incorrect in that case - see + // issue #8153). + _ = fn.fn jmpdefer(fn, uintptr(unsafe.Pointer(&arg0))) } |
