public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] dwarf5: Fix parsing DWARF-5 line number tables
@ 2021-01-23 23:29 H.J. Lu
  2021-01-23 23:29 ` H.J. Lu
  2021-01-23 23:40 ` [PATCH] dwarf5: Fix parsing " Mark Wielaard
  0 siblings, 2 replies; 7+ messages in thread
From: H.J. Lu @ 2021-01-23 23:29 UTC (permalink / raw)
  To: binutils; +Cc: Mark Wielaard, Alan Modra, Nick Clifton

Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in

commit c3757b583d2448a5996e83e374fb96ac7938da35
Author: Mark Wielaard <mark@klomp.org>
Date:   Tue Aug 25 15:33:00 2020 +0100

    Fix the linker's handling of DWARF-5 line number tables.

OK for master and 2.36 branch?

H.J.
---
	PR binutils/27231
	* dwarf2.c (read_rnglists): Advance rngs_ptr after
	_bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
---
 bfd/dwarf2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index d1770ae4fdb..292d60c33d4 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3265,9 +3265,11 @@ read_rnglists (struct comp_unit *unit, struct arange *arange,
 	  low_pc = base_address;
 	  low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
 					   FALSE, rngs_end);
+	  rngs_ptr += bytes_read;
 	  high_pc = base_address;
 	  high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
 					    FALSE, rngs_end);
+	  rngs_ptr += bytes_read;
 	  break;
 
 	case DW_RLE_start_end:
-- 
2.29.2


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

end of thread, other threads:[~2021-01-24 14:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-23 23:29 [PATCH] dwarf5: Fix parsing DWARF-5 line number tables H.J. Lu
2021-01-23 23:29 ` H.J. Lu
2021-01-24  1:34   ` Alan Modra
2021-01-24  4:16     ` [PATCH] DWARF-5: Skip empty range in " H.J. Lu
2021-01-24 11:58       ` H.J. Lu
2021-01-24 14:11         ` [PATCH] DWARF-5: Ignore " H.J. Lu
2021-01-23 23:40 ` [PATCH] dwarf5: Fix parsing " 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).