#
a8a78d75 |
| 05-Mar-2024 |
Andrew Jones <andrew.jones@linux.dev> |
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 befor
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: 52266791750d ("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>
show more ...
|
#
2c92230a |
| 19-Apr-2016 |
Andrew Jones <drjones@redhat.com> |
arm: stack: add dump_stack support
This actually fixes the arm build too, as arm's __builtin_return_address doesn't allow any input other than zero, and thus the common backtrace() wasn't compiling.
arm: stack: add dump_stack support
This actually fixes the arm build too, as arm's __builtin_return_address doesn't allow any input other than zero, and thus the common backtrace() wasn't compiling.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-By: Peter Feiner <pfeiner@google.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|