[libunwind] [libunwind][AIX] Fix the wrong traceback from signal handler (PR #101069)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 12:19:52 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libunwind
Author: Xing Xue (xingxue-ibm)
<details>
<summary>Changes</summary>
Patch [llvm#<!-- -->92291](https://github.com/llvm/llvm-project/pull/92291) causes wrong traceback from a signal handler for AIX because the AIX unwinder uses the traceback table at the end of each function instead of FDE/CIE for unwinding. This patch adds a condition to exclude traceback table based unwinding from the code added by the patch.
---
Full diff: https://github.com/llvm/llvm-project/pull/101069.diff
1 Files Affected:
- (modified) libunwind/src/UnwindCursor.hpp (+2-1)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/101069
More information about the cfe-commits
mailing list