In the commit d04dc94cc2b0141f06ed9de1665ab89a3f549e0b, the check for
dwarf.ip == 0 was removed from non-dwarf walker in x86_64 version of
unw_step(). Apparently this broke the detection of the end of frame
chain when NULL %rbp is specified, because the case just marked
dwarf.ip as 0. Explicitely set ret to 0 to indicate the end of
iteration.
Similarly, if dwarf_get() reading of %rip succeeds for non-dward walker,
reset the ret to 1. The success value of 0 stops the iteration.
---
src/x86_64/Gstep.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/x86_64/Gstep.c b/src/x86_64/Gstep.c
index 5ecee26..e05fcae 100644
--- a/src/x86_64/Gstep.c
+++ b/src/x86_64/Gstep.c
@@ -85,7 +85,10 @@ unw_step (unw_cursor_t *cursor)
/* x86_64 ABI specifies that end of call-chain is marked with a
NULL RBP. */
if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP]))
- c->dwarf.ip = 0;
+ {
+ c->dwarf.ip = 0;
+ ret = 0;
+ }
}
else
{
@@ -206,6 +209,7 @@ unw_step (unw_cursor_t *cursor)
Debug (2, "returning %d\n", ret);
return ret;
}
+ ret = 1;
}
else
c->dwarf.ip = 0;
--
1.7.9.6
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel