aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2022-06-20 08:57:12 +0000
committerAlex Richardson <alexrichardson@google.com>2022-06-20 09:05:49 +0000
commit8df257a6d0b0b32e05e89874eff4c8ddd2a2a2a9 (patch)
tree8864ace3b8a3835cfed86de3ce2991ec224b4246 /llvm/lib/CodeGen/LiveDebugVariables.cpp
parentb02d970b4335561940dd584f6e6497ab684c788d (diff)
downloadllvm-8df257a6d0b0b32e05e89874eff4c8ddd2a2a2a9.zip
llvm-8df257a6d0b0b32e05e89874eff4c8ddd2a2a2a9.tar.gz
llvm-8df257a6d0b0b32e05e89874eff4c8ddd2a2a2a9.tar.bz2
[libunwind] Ensure test/libunwind_01.pass is not completely inlined
By adding noinline and calling fprintf before returning we ensure that every function will have a distinct call frame and that the return address will always be saved instead of saving the target in main as the result. Before this change all backtraces were always backtrace -> main -> _start, i.e. always exactly three entries. This happenend because all calls were inlined in main() and the test just happenend to pass because there is at least _start before main. I found this while fixing some bugs in libunwind for CHERI and noticed that the test was passing even though the code was completely broken. Obtained from: https://github.com/CTSRD-CHERI/llvm-project Reviewed By: #libunwind, ldionne, MaskRay Differential Revision: https://reviews.llvm.org/D126611
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions