bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12640] Gold accesses vector out of range


From: ppluzhnikov at google dot com
Subject: [Bug gold/12640] Gold accesses vector out of range
Date: Tue, 5 Apr 2011 17:53:58 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12640

--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2011-04-05 
17:53:51 UTC ---
The fix appears trivial:

Index: dwarf_reader.cc
===================================================================
RCS file: /cvs/src/src/gold/dwarf_reader.cc,v
retrieving revision 1.32
diff -u -p -r1.32 dwarf_reader.cc
--- dwarf_reader.cc     10 Mar 2011 01:31:32 -0000      1.32
+++ dwarf_reader.cc     5 Apr 2011 17:40:17 -0000
@@ -188,7 +188,7 @@ Sized_dwarf_line_info<size, big_endian>:
   header_.opcode_base = *lineptr;
   lineptr += 1;

-  header_.std_opcode_lengths.reserve(header_.opcode_base + 1);
+  header_.std_opcode_lengths.resize(header_.opcode_base + 1);
   header_.std_opcode_lengths[0] = 0;
   for (int i = 1; i < header_.opcode_base; i++)
     {

This makes all the small tests pass.
(Building ld1, ld2, etc. with _GLIBCXX_DEBUG'd gold takes forever.)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]