summaryrefslogtreecommitdiff
path: root/libdwfl/frame_unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/frame_unwind.c')
-rw-r--r--libdwfl/frame_unwind.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c
index d7dfa5a9..9ac33833 100644
--- a/libdwfl/frame_unwind.c
+++ b/libdwfl/frame_unwind.c
@@ -562,7 +562,11 @@ handle_cfi (Dwfl_Frame *state, Dwarf_Addr pc, Dwarf_CFI *cfi, Dwarf_Addr bias)
/* The return register is special for setting the unwound->pc_state. */
unsigned ra = frame->fde->cie->return_address_register;
bool ra_set = false;
- ebl_dwarf_to_regno (ebl, &ra);
+ if (! ebl_dwarf_to_regno (ebl, &ra))
+ {
+ __libdwfl_seterrno (DWFL_E_INVALID_REGISTER);
+ return;
+ }
for (unsigned regno = 0; regno < nregs; regno++)
{
@@ -719,7 +723,8 @@ __libdwfl_frame_unwind (Dwfl_Frame *state)
which would deadlock us. */
Dwarf_Addr pc;
bool ok = INTUSE(dwfl_frame_pc) (state, &pc, NULL);
- assert (ok);
+ if (!ok)
+ return;
/* Check whether this is the initial frame or a signal frame.
Then we need to unwind from the original, unadjusted PC. */
if (! state->initial_frame && ! state->signal_frame)