[libunwind][AIX] Fix the wrong traceback from signal handler#101069
Merged
xingxue-ibm merged 2 commits intollvm:mainfrom Jul 30, 2024
Merged
[libunwind][AIX] Fix the wrong traceback from signal handler#101069xingxue-ibm merged 2 commits intollvm:mainfrom
xingxue-ibm merged 2 commits intollvm:mainfrom
Conversation
Member
|
@llvm/pr-subscribers-libunwind Author: Xing Xue (xingxue-ibm) ChangesPatch llvm#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:
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.
|
compnerd
approved these changes
Jul 29, 2024
…e added to exclude traceback based unwinding used for AIX.
Member
|
/cherry-pick d90fa61 |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 30, 2024
…1069) Patch [llvm#92291](llvm#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. (cherry picked from commit d90fa61)
Member
|
/pull-request #101182 |
tru
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 31, 2024
…1069) Patch [llvm#92291](llvm#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. (cherry picked from commit d90fa61)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch llvm#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.