Hi,
The following looks like a typo in intern_fde():
diff --git a/libdw/fde.c b/libdw/fde.c
index f38eed7..c826114 100644
--- a/libdw/fde.c
+++ b/libdw/fde.c
@@ -115,7 +115,7 @@ intern_fde (Dwarf_CFI *cache, const Dwarf_FDE *entry)
before its actual instruction stream. */
Dwarf_Word len;
get_uleb128 (len, fde->instructions);
- if ((Dwarf_Word) (fde->instructions_end < fde->instructions) < len)
+ if ((Dwarf_Word) (fde->instructions_end - fde->instructions) < len)
{
free (fde);
__libdw_seterrno (DWARF_E_INVALID_DWARF);
A testcase for this is a systemtap compiled against the latest gcc on
fedora12 (x86_64) 4.4.2 20091222 (Red Hat 4.4.2-20) and doing:
./run-stap -p2 -ve
'probe process("./stap").mark("pass0__start") {
log(sprint(&$s)) }'
Without the above fix it will complain about invalid dwarf (with enough
-vvvv options). With the fix it works as intended.
OK to push?
Mark