forked from OSchip/llvm-project
8df257a6d0
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 |
||
---|---|---|
.. | ||
configs | ||
libunwind | ||
CMakeLists.txt | ||
alignment.compile.pass.cpp | ||
bad_unwind_info.pass.cpp | ||
floatregister.pass.cpp | ||
forceunwind.pass.cpp | ||
frameheadercache_test.pass.cpp | ||
libunwind_01.pass.cpp | ||
libunwind_02.pass.cpp | ||
lit.cfg.py | ||
lit.site.cfg.in | ||
remember_state_leak.pass.sh.s | ||
signal_frame.pass.cpp | ||
signal_unwind.pass.cpp | ||
unw_getcontext.pass.cpp | ||
unwind_leaffunction.pass.cpp |