This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgo patch committed: Improve handling of panic during deferred function


When a Go panic occurs while processing a deferred function that
recovered an earlier panic, we shouldn't report the recovered panic in
the panic stack trace. This libgo patch stops doing so by keeping
track of the panic that triggered a defer, marking it as aborted if we
see the defer again, and discarding aborted panics when a panic is
recovered. This is what the gc runtime does.

The test for this is TestRecursivePanic in runtime/crash_test.go.  We
don't run that test yet, but we will soon.

Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]