• Austin Clements's avatar
    runtime: suppress "unexpected return pc" any time we're in cgo · 3ff41cdf
    Austin Clements authored
    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: 's avatarIan Lance Taylor <iant@golang.org>
    3ff41cdf
traceback.go 39.7 KB