1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-02 09:22:36 +02: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,8 +83,9 @@ 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]))
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;