treewide: lib/stack: Fix backtrace
We should never pass the result of __builtin_frame_address(0) to another function since the compiler is within its rights to pop the frame to which it points before making the function call, as may be done for tail calls. Nobody has complained about backtrace(), so likely all compilations have been inlining backtrace_frame(), not dropping the frame on the tail call, or nobody is looking at traces. However, for riscv, when built for EFI, it does drop the frame on the tail call, and it was noticed. Preemptively fix backtrace() for all architectures. Fixes: 52266791 ("lib: backtrace printing") Acked-by:Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Andrew Jones <andrew.jones@linux.dev>
Loading
Please register or sign in to comment