public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] readelf: Make room for DW_MACRO_hi_user opcode if used.
@ 2018-06-05 19:06 Mark Wielaard
  2018-06-08 10:06 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2018-06-05 19:06 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Mark Wielaard

The vendor array should have room for all vendor opcode, including
DW_MACRO_hi_user if used.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 src/ChangeLog | 5 +++++
 src/readelf.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index cc12d83..c376a5b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-05  Mark Wielaard  <mark@klomp.org>
+
+	* readelf.c (print_debug_macro_section): Extend vendor array by one
+	to include max DW_MACRO_hi_user opcode.
+
 2018-05-31  Mark Wielaard  <mark@klomp.org>
 
 	* readelf.c (print_debug_units): Print the dwo name and id when
diff --git a/src/readelf.c b/src/readelf.c
index 0725313..6c17788 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -9736,7 +9736,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
 							       ? cu->die.cu
 							       : NULL));
 
-      const unsigned char *vendor[DW_MACRO_hi_user - DW_MACRO_lo_user];
+      const unsigned char *vendor[DW_MACRO_hi_user - DW_MACRO_lo_user + 1];
       memset (vendor, 0, sizeof vendor);
       if (flag & 0x04)
 	{
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] readelf: Make room for DW_MACRO_hi_user opcode if used.
  2018-06-05 19:06 [PATCH] readelf: Make room for DW_MACRO_hi_user opcode if used Mark Wielaard
@ 2018-06-08 10:06 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2018-06-08 10:06 UTC (permalink / raw)
  To: elfutils-devel

On Tue, 2018-06-05 at 21:06 +0200, Mark Wielaard wrote:
> The vendor array should have room for all vendor opcode, including
> DW_MACRO_hi_user if used.

Pushed to master.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-08 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 19:06 [PATCH] readelf: Make room for DW_MACRO_hi_user opcode if used Mark Wielaard
2018-06-08 10:06 ` Mark Wielaard

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).