History log of /kvm-unit-tests/lib/x86/stack.c (Results 1 – 4 of 4)
Revision Date Author Comments
# 6444ae20 18-Mar-2024 Andrew Jones <andrew.jones@linux.dev>

Merge branch 'riscv/queue' into 'master'

riscv: Add EFI support and SBI base ext tests

See merge request kvm-unit-tests/kvm-unit-tests!54


# 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 ...


# 804e551c 03-Nov-2016 Andrew Jones <drjones@redhat.com>

lib/x86/stack: fix null dereference

With gcc 6.2.1 (gcc-6.2.1-2.fc24.x86_64) hitting an assert() in x86
code causes an infinite loop. This is due to a null dereference in
backtrace_frame. Let's not

lib/x86/stack: fix null dereference

With gcc 6.2.1 (gcc-6.2.1-2.fc24.x86_64) hitting an assert() in x86
code causes an infinite loop. This is due to a null dereference in
backtrace_frame. Let's not do that.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# 52266791 22-Mar-2016 Peter Feiner <pfeiner@google.com>

lib: backtrace printing

Functions to walk stack and print backtrace. The stack's unadorned as

STACK: [@]addr addr addr ...

where the optional @ indicates that addr isn't a return address.

A foll

lib: backtrace printing

Functions to walk stack and print backtrace. The stack's unadorned as

STACK: [@]addr addr addr ...

where the optional @ indicates that addr isn't a return address.

A follow-up patch post-processes the output to pretty-print the stack.

Frame stack walker is just a stub on arm and ppc.

Signed-off-by: Peter Feiner <pfeiner@google.com>
Reviewed-By: Andrew Jones <drjones@redhat.com>
Message-Id: <adc65c3511125ea46f0fe53a2fc53a062ada7924.1458689655.git.pfeiner@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...