* readelf.c (display_debug_frames): Don't crash for mismatched
DW_CFA_restore_state.
This commit is contained in:
parent
b2a8e7660e
commit
8c9a987975
|
@ -1,3 +1,8 @@
|
||||||
|
2004-03-21 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* readelf.c (display_debug_frames): Don't crash for mismatched
|
||||||
|
DW_CFA_restore_state.
|
||||||
|
|
||||||
2004-03-19 Alan Modra <amodra@bigpond.net.au>
|
2004-03-19 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* Makefile.am: Run "make dep-am".
|
* Makefile.am: Run "make dep-am".
|
||||||
|
|
|
@ -9150,13 +9150,19 @@ display_debug_frames (Elf_Internal_Shdr *section,
|
||||||
if (! do_debug_frames_interp)
|
if (! do_debug_frames_interp)
|
||||||
printf (" DW_CFA_restore_state\n");
|
printf (" DW_CFA_restore_state\n");
|
||||||
rs = remembered_state;
|
rs = remembered_state;
|
||||||
remembered_state = rs->next;
|
if (rs)
|
||||||
frame_need_space (fc, rs->ncols-1);
|
{
|
||||||
memcpy (fc->col_type, rs->col_type, rs->ncols);
|
remembered_state = rs->next;
|
||||||
memcpy (fc->col_offset, rs->col_offset, rs->ncols * sizeof (int));
|
frame_need_space (fc, rs->ncols-1);
|
||||||
free (rs->col_type);
|
memcpy (fc->col_type, rs->col_type, rs->ncols);
|
||||||
free (rs->col_offset);
|
memcpy (fc->col_offset, rs->col_offset,
|
||||||
free (rs);
|
rs->ncols * sizeof (int));
|
||||||
|
free (rs->col_type);
|
||||||
|
free (rs->col_offset);
|
||||||
|
free (rs);
|
||||||
|
}
|
||||||
|
else if (do_debug_frames_interp)
|
||||||
|
printf ("Mismatched DW_CFA_restore_state\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DW_CFA_def_cfa:
|
case DW_CFA_def_cfa:
|
||||||
|
|
Loading…
Reference in New Issue