]> Cypherpunks repositories - gostls13.git/commit
runtime: suppress "unexpected return pc" any time we're in cgo
authorAustin Clements <austin@google.com>
Wed, 31 Jan 2018 16:55:22 +0000 (11:55 -0500)
committerAustin Clements <austin@google.com>
Wed, 31 Jan 2018 20:57:52 +0000 (20:57 +0000)
commit3ff41cdffade9e7b5a78fa56a43351dbd665df7a
tree5f031561651603c92cfc0aed7ad18b5c36f16e28
parentd929e40e9aed54ef7cd9f8853a34334f4f3c8f8e
runtime: suppress "unexpected return pc" any time we're in cgo

Currently, gentraceback suppresses the "unexpected return pc" error
for sigpanic's caller if the M was running C code.

However, there are various situations where a sigpanic is injected
into C code that can cause traceback to unwind *past* the sigpanic
before realizing that it's in trouble (the traceback beyond the
sigpanic will be wrong).

Rather than try to fix these issues for Go 1.10, this CL simply
disables complaining about unexpected return PCs if we're in cgo
regardless of whether or not they're from the sigpanic frame. Go 1.9
never complained about unexpected return PCs when printing, so this is
simply a step closer to the old behavior.

This should fix the openbsd-386 failures on the dashboard, though this
issue could affect any architecture.

Fixes #23640.

Change-Id: I8c32c1ee86a70d2f280661ed1f8caf82549e324b
Reviewed-on: https://go-review.googlesource.com/91136
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/traceback.go