mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-02-02 12:31:10 +00:00
[MIPS]: Don't terminate stackwalk when $sp value doesn't change between frames
Currently on MIPS we accidentally terminate stackwalk if $sp value doesn't change between frames which results in incomplete callchain terminated at the point of first tailcall encountered. Change-Id: I8f1ed1df958d8f0a9eb11fd7800062184d8f1ee2 Reviewed-on: https://chromium-review.googlesource.com/449755 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
7ec3caf6c7
commit
796a6c9baf
|
@ -280,7 +280,7 @@ StackFrame* StackwalkerMIPS::GetCallerFrame(const CallStack* stack,
|
||||||
// If the new stack pointer is at a lower address than the old, then
|
// If the new stack pointer is at a lower address than the old, then
|
||||||
// that's clearly incorrect. Treat this as end-of-stack to enforce
|
// that's clearly incorrect. Treat this as end-of-stack to enforce
|
||||||
// progress and avoid infinite loops.
|
// progress and avoid infinite loops.
|
||||||
if (new_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP] <=
|
if (new_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP] <
|
||||||
last_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP]) {
|
last_frame->context.iregs[MD_CONTEXT_MIPS_REG_SP]) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,9 +533,6 @@ struct CFIFixture: public StackwalkerMIPSFixture {
|
||||||
|
|
||||||
// The calling function.
|
// The calling function.
|
||||||
"FUNC 5000 1000 0 epictetus\n"
|
"FUNC 5000 1000 0 epictetus\n"
|
||||||
// Initially, nothing has been pushed on the stack,
|
|
||||||
// and the return address is still in the $ra register.
|
|
||||||
"STACK CFI INIT 5000 1000 .cfa: $sp .ra: $ra\n"
|
|
||||||
// Mark it as end of stack.
|
// Mark it as end of stack.
|
||||||
"STACK CFI INIT 5000 8 .cfa: $sp 0 + .ra: $ra\n"
|
"STACK CFI INIT 5000 8 .cfa: $sp 0 + .ra: $ra\n"
|
||||||
|
|
||||||
|
|
|
@ -525,9 +525,6 @@ struct CFIFixture: public StackwalkerMIPSFixture {
|
||||||
|
|
||||||
// The calling function.
|
// The calling function.
|
||||||
"FUNC 5000 1000 0 epictetus\n"
|
"FUNC 5000 1000 0 epictetus\n"
|
||||||
// Initially, nothing has been pushed on the stack,
|
|
||||||
// and the return address is still in the $ra register.
|
|
||||||
"STACK CFI INIT 5000 1000 .cfa: $sp .ra: $ra\n"
|
|
||||||
// Mark it as end of stack.
|
// Mark it as end of stack.
|
||||||
"STACK CFI INIT 5000 8 .cfa: $sp 0 + .ra: $ra\n"
|
"STACK CFI INIT 5000 8 .cfa: $sp 0 + .ra: $ra\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue