If the FDE end <= start then it doesn't actually cover a valid code range.
Don't use and cache such FDEs (it will cause memory leaks if there is
another FDE that has the same start address and a valid code range).
Such FDEs have been seen in the backtrace.ppc.exec testfile.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2015-12-01 Mark Wielaard <mjw@redhat.com>
+
+ * fde.c (intern_fde): Don't intern an fde that doesn't cover a
+ valid code range.
+
2015-12-01 Mark Wielaard <mjw@redhat.com>
* dwarf_end.c (dwarf_end): Call cu_free on fake_loc_cu if it exists.
}
fde->end += fde->start;
+ /* Make sure the fde actually covers a real code range. */
+ if (fde->start >= fde->end)
+ {
+ free (fde);
+ return (void *) -1;
+ }
+
fde->cie = cie;
if (cie->sized_augmentation_data)