diff mbox series

libgo patch committed: Let ARM EABI continue unwind during traceback

Message ID CAOyqgcWvDUsKj5xeF8oUvc67YczSipPx-0u1REw0=45aL+Ng+A@mail.gmail.com
State New
Headers show
Series libgo patch committed: Let ARM EABI continue unwind during traceback | expand

Commit Message

Ian Lance Taylor Dec. 27, 2018, 4:31 p.m. UTC
This patch by Cherry Zhang lets the ARM32 EABI personality function
continue unwinding when called during 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.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.  Committed
to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 267433)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -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.
Index: libgo/runtime/go-unwind.c
===================================================================
--- libgo/runtime/go-unwind.c	(revision 267433)
+++ libgo/runtime/go-unwind.c	(working copy)
@@ -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;