aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorXing Xue <xingxue@outlook.com>2023-10-16 12:24:05 -0400
committerXing Xue <xingxue@outlook.com>2023-10-16 12:24:05 -0400
commit45d151138008c4880c8f9b77ffc43c23e0a9f1cb (patch)
tree64df6bc42497f271eb68b2f9d86972127d0b3557 /llvm/lib/CodeGen/LiveVariables.cpp
parentb51eaebd2b437ff4fdb8b2e80131a665da80a290 (diff)
downloadllvm-45d151138008c4880c8f9b77ffc43c23e0a9f1cb.zip
llvm-45d151138008c4880c8f9b77ffc43c23e0a9f1cb.tar.gz
llvm-45d151138008c4880c8f9b77ffc43c23e0a9f1cb.tar.bz2
[libunwind][AIX] Fix problem with stepping up from a leaf function when unwinding started in a signal handler
Summary: The implementation of AIX unwinder gets the return address from the link area of the stack frame of a function and uses the return address to walk up functions. However, when unwinding starts from a signal handler and the function that raised the signal happens to be a leaf function and it does not have its own stack frame, the return address of the stack frame of the leaf function points to the caller of the function that calls the leaf function because the leaf function and its caller share the same stack frame. As a result, the caller of the leaf function is skipped. This patch fixes the problem by saving the LR value in sigcontext when the unwinder hits the signal handler trampoline frame and using it as the return address of the leaf function. The LR value from sigcontext is saved in the unwinding context slot for LR currently unused. Reviewed by: stephenpeckham Differential Revision: https://reviews.llvm.org/D158655
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
0 files changed, 0 insertions, 0 deletions