aboutsummaryrefslogtreecommitdiff
path: root/libdwfl/frame_unwind.c
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:00:34 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-15 02:00:34 +0000
commit679de50eefd4bf9119c74609642fe993172a0813 (patch)
tree15db324236530f56b2ab76f876a5aeeb6959f8c3 /libdwfl/frame_unwind.c
parent5f92182e496a66149ba09c92fe497135643663f5 (diff)
parent09dec374e7387d9521b54bcd682bb1431fdf36b8 (diff)
downloadelfutils-android12-mainline-captiveportallogin-release.tar.gz
Snap for 7550930 from 09dec374e7387d9521b54bcd682bb1431fdf36b8 to mainline-captiveportallogin-releaseandroid-mainline-12.0.0_r6android-mainline-12.0.0_r23android12-mainline-captiveportallogin-release
Change-Id: I945cca00757ad0471b521cfd953ac4be163ea03d
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)