From f1410e7e2e98fa3ed4112bf91c90ee6ff7476e7d Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 27 Dec 2018 16:31:50 +0000 Subject: [PATCH] runtime: let ARM32 EABI personality function continue unwind when called from traceback On ARM32 EABI, unlike other platforms, the personality function is called during _Unwind_Backtrace (libgcc/unwind-arm-common.inc:581). In this case, simply unwind the frame without returning any handlers. Otherwise traceback will loop if there is a frame with a defer on stack. Reviewed-on: https://go-review.googlesource.com/c/155759 From-SVN: r267434 --- gcc/go/gofrontend/MERGE | 2 +- libgo/runtime/go-unwind.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 2bcf536..056653a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -785414705628bf9d1279a8042e1886440424aade +5a9ff61d72c95a50cbbfb0e1bf57646197910363 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/go-unwind.c b/libgo/runtime/go-unwind.c index 388d7c7..58cb270 100644 --- a/libgo/runtime/go-unwind.c +++ b/libgo/runtime/go-unwind.c @@ -444,6 +444,9 @@ PERSONALITY_FUNCTION (int version, switch (state & _US_ACTION_MASK) { case _US_VIRTUAL_UNWIND_FRAME: + if (state & _UA_FORCE_UNWIND) + /* We are called from _Unwind_Backtrace. No handler to run. */ + CONTINUE_UNWINDING; actions = _UA_SEARCH_PHASE; break; -- 2.7.4