1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-25 04:23:42 +01:00

Stop unwinding on undefined return address

Milian Wolff <mail@milianw.de> reported that this greatly
improved unwinding perf on some his apps.
This commit is contained in:
Arun Sharma 2014-09-07 02:55:07 -07:00
parent 4791a76d26
commit 0808aa6737

View file

@ -83,12 +83,13 @@ unw_step (unw_cursor_t *cursor)
if (likely (ret >= 0))
{
/* 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;
ret = 0;
}
NULL RBP or undefined return address */
if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP])
|| DWARF_IS_NULL_LOC(c->dwarf.loc[c->dwarf.ret_addr_column]))
{
c->dwarf.ip = 0;
ret = 0;
}
}
else
{