Don't fill up the test logs with obviously bogus frames.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-06-15 Mark Wielaard <mjw@redhat.com>
+
+ * backtrace.c (frame_callback): Error on seeing more than 16 frames.
+
2014-06-13 Mark Wielaard <mjw@redhat.com>
* backtrace.c (callback_verify): Accept "__libc_do_syscall" as first
int *framenop = frame_arg;
Dwarf_Addr pc;
bool isactivation;
+
+ if (*framenop > 16)
+ {
+ error (0, 0, "Too many frames: %d\n", *framenop);
+ return DWARF_CB_ABORT;
+ }
+
if (! dwfl_frame_pc (state, &pc, &isactivation))
{
error (0, 0, "%s", dwfl_errmsg (-1));