From: Milian Wolff <milian.wolff@kdab.com>
To: elfutils-devel@sourceware.org
Cc: mark@klomp.org, Milian Wolff <milian.wolff@kdab.com>
Subject: [PATCH] Fix CFI interpretation for locations on DW_CFA_*_loc boundaries
Date: Thu, 01 Nov 2018 08:49:00 -0000 [thread overview]
Message-ID: <20181101084818.16153-1-milian.wolff@kdab.com> (raw)
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
next reply other threads:[~2018-11-01 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 8:49 Milian Wolff [this message]
2018-11-01 9:12 ` Milian Wolff
2018-11-01 12:32 ` Milian Wolff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181101084818.16153-1-milian.wolff@kdab.com \
--to=milian.wolff@kdab.com \
--cc=elfutils-devel@sourceware.org \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).