[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)
Xing Xue via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 12:50:58 PDT 2024
https://github.com/xingxue-ibm updated https://github.com/llvm/llvm-project/pull/101069
>From 05110959c01b5b7d4f2530e4d21232053db939f3 Mon Sep 17 00:00:00 2001
From: Xing Xue <xingxue at outlook.com>
Date: Mon, 29 Jul 2024 14:53:36 -0400
Subject: [PATCH 1/2] Fix the problem introduced by upstream patch
https://github.com/llvm/llvm-project/pull/92291 guard the code added to
exclude traceback based unwinding used for AIX.
---
libunwind/src/UnwindCursor.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp
index 2ec60e4c123d5..758557337899e 100644
--- a/libunwind/src/UnwindCursor.hpp
+++ b/libunwind/src/UnwindCursor.hpp
@@ -2589,7 +2589,8 @@ void UnwindCursor<A, R>::setInfoBasedOnIPRegister(bool isReturnAddress) {
--pc;
#endif
-#if !(defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && defined(_WIN32))
+#if !(defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && defined(_WIN32)) && \
+ !defined(_LIBUNWIND_SUPPORT_TBTAB_UNWIND)
// In case of this is frame of signal handler, the IP saved in the signal
// handler points to first non-executed instruction, while FDE/CIE expects IP
// to be after the first non-executed instruction.
>From c5176fb8bdb18d3776d3df98a6a15f9630184982 Mon Sep 17 00:00:00 2001
From: Xing Xue <xingxue at outlook.com>
Date: Mon, 29 Jul 2024 15:49:27 -0400
Subject: [PATCH 2/2] Fix REQUIRES for AIX.
---
libunwind/test/aix_signal_unwind.pass.sh.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libunwind/test/aix_signal_unwind.pass.sh.S b/libunwind/test/aix_signal_unwind.pass.sh.S
index 9ca18e9481f4f..a666577d095b1 100644
--- a/libunwind/test/aix_signal_unwind.pass.sh.S
+++ b/libunwind/test/aix_signal_unwind.pass.sh.S
@@ -10,7 +10,7 @@
// a correct traceback when the function raising the signal does not save
// the link register or does not store the stack back chain.
-// REQUIRES: target=powerpc{{(64)?}}-ibm-aix
+// REQUIRES: target=powerpc{{(64)?}}-ibm-aix{{.*}}
// Test when the function raising the signal does not save the link register
// RUN: %{cxx} -x c++ %s -o %t.exe -DCXX_CODE %{flags} %{compile_flags}
More information about the cfe-commits
mailing list