This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Fix CFI interpretation for locations on DW_CFA_*_loc boundaries
- From: Milian Wolff <milian dot wolff at kdab dot com>
- To: elfutils-devel at sourceware dot org
- Cc: mark at klomp dot org, Milian Wolff <milian dot wolff at kdab dot com>
- Date: Thu, 1 Nov 2018 09:48:18 +0100
- Subject: [PATCH] Fix CFI interpretation for locations on DW_CFA_*_loc boundaries
According to the DWARF v3 standard §6.4.3 3., all call frame
instructions up to L1 <= L2 should be interpreted for an FDE.
Elfutils currently only interprets L1 < L2, potentially missing
some instructions when L1 directly points at a DW_CFA_*_loc boundary.
This patch changes the behavior and makes elfutils behave like
libunwind in that regard.
---
libdw/cfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdw/cfi.c b/libdw/cfi.c
index 341e055b..332c6b8b 100644
--- a/libdw/cfi.c
+++ b/libdw/cfi.c
@@ -125,7 +125,7 @@ execute_cfi (Dwarf_CFI *cache,
fs->regs[regno].value = (r_value); \
} while (0)
- while (program < end)
+ while (program <= end)
{
uint8_t opcode = *program++;
Dwarf_Word regno;
--
2.19.1