aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorMarco Vanotti <mvanotti@google.com>2021-07-23 15:54:24 -0700
committerMarco Vanotti <mvanotti@google.com>2021-07-28 17:59:02 -0700
commita9c515983dc26992ce67668ad64f066353853ed1 (patch)
tree3d00c1eaca143d82e2673e01680eae330b36ffd2 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parentd6704e5ed91478464e551ee9d5520584978553ee (diff)
downloadllvm-a9c515983dc26992ce67668ad64f066353853ed1.zip
llvm-a9c515983dc26992ce67668ad64f066353853ed1.tar.gz
llvm-a9c515983dc26992ce67668ad64f066353853ed1.tar.bz2
[libFuzzer] Fix CFI Directives for fuchsia
This commit fixes the CFI directives in the crash trampoline so libunwind can get a backtrace during a crash. In order to get a backtrace from a libfuzzer crash in fuchsia, we resume execution in the crashed thread, forcing it to call the StaticCrashHandler. We do this by setting a "crash trampoline" that has all the necessary cfi directives for an unwinder to get full backtrace for that thread. Due to a bug in libunwind, it was not possible to restore the RSP pointer, as it was always set to the call frame address (CFA). The previous version worked around this issue by setting the CFA to the value of the stack pointer at the point of the crash. The bug in libunwind is now fixed[0], so I am correcting the CFI annotations so that the CFA correctly points to the beginning of the trampoline's call frame. [0]: https://reviews.llvm.org/D106626 Reviewed By: mcgrathr Differential Revision: https://reviews.llvm.org/D106725
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions