http://sourceware.org/bugzilla/show_bug.cgi?id=12640
Summary: Gold accesses vector out of range Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: ppluzhni...@google.com If current HEAD is built with -D_GLIBCXX_DEBUG, then debug_msg test case fails with: error: attempt to subscript container with out-of-bounds index 0, but container only holds 0 elements. Objects involved in the operation: sequence "this" @ 0x0x7fffffff68d8 { type = NSt7__debug6vectorIhSaIhEEE; } This is happening here: #0 0x00007ffff70b89f5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff70bc413 in abort () at abort.c:92 #2 0x00007ffff790a70d in __gnu_debug::_Error_formatter::_M_error() const () from /usr/lib64/libstdc++.so.6 #3 0x00000000006cd5ac in std::__debug::vector<unsigned char, std::allocator<unsigned char> >::operator[] (this=0x7fffffff68d8, __n=0) at ../lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/debug/vector:265 #4 0x00000000007d070f in gold::Sized_dwarf_line_info<64, false>::read_header_prolog (this=0x7fffffff68a0, lineptr=0x7ffff7ff8315 "") at ../../src/gold/dwarf_reader.cc:192 #5 0x00000000007d0188 in gold::Sized_dwarf_line_info<64, false>::read_line_mappings (this=0x7fffffff68a0, object=0xaa5f40, shndx=4294967295) at ../../src/gold/dwarf_reader.cc:576 #6 0x00000000007caf24 in gold::Sized_dwarf_line_info<64, false>::Sized_dwarf_line_info (this=0x7fffffff68a0, object=0xaa5f40, read_shndx=4294967295) at ../../src/gold/dwarf_reader.cc:139 #7 0x00000000005e7f3b in gold::Relocate_info<64, false>::location ( this=0x7fffffff6df0, offset=37) at ../../src/gold/object.cc:2608 #8 0x000000000056f2fc in gold::gold_undefined_symbol_at_location<64, false> (sym=0xaaa9b0, relinfo=0x7fffffff6df0, relnum=2, reloffset=37) at ../../src/gold/errors.cc:296 #9 0x000000000044e29a in gold::relocate_section<64, false, <unnamed>::Target_x86_64, 4, <unnamed>::Target_x86_64::Relocate>(const gold::Relocate_info<64, false> *, (anonymous namespace)::Target_x86_64 *, const unsigned char *, size_t, gold::Output_section *, bool, unsigned char *, uint64_t, gold::section_size_type, const gold::Reloc_symbol_changes *) (relinfo=0x7fffffff6df0, target=0xaa5e50, prelocs=0x7ffff7ff8ae0 "%", reloc_count=8, output_section=0xaa70b0, needs_special_offset_handling=false, view=0x7ffff6294460 "1\355\350(", view_address=4195424, view_size=132, reloc_symbol_changes=0x0) at ../../src/gold/target-reloc.h:354 #10 0x000000000044bde5 in (anonymous namespace)::Target_x86_64::relocate_section (this=0xaa5e50, relinfo=0x7fffffff6df0, sh_type=4, prelocs=0x7ffff7ff8ab0 "\027", reloc_count=8, output_section=0xaa70b0, needs_special_offset_handling=false, view=0x7ffff6294460 "1\355\350(", address=4195424, view_size=132, reloc_symbol_changes=0x0) at ../../src/gold/x86_64.cc:3014 #11 0x00000000006d5988 in gold::Sized_relobj<64, false>::do_relocate_sections (this=0xaa5f40, symtab=0x7fffffffc720, layout=0x7fffffffc220, pshdrs=0x7ffff7ff8530 "", of=0xaa9b00, pviews=0x7fffffff6f80) at ../../src/gold/reloc.cc:993 #12 0x00000000005de4da in gold::Sized_relobj<64, false>::relocate_sections (this=0xaa5f40, symtab=0x7fffffffc720, layout=0x7fffffffc220, pshdrs=0x7ffff7ff8530 "", of=0xaa9b00, pviews=0x7fffffff6f80) at ../../src/gold/object.h:2086 #13 0x00000000006d3ea4 in gold::Sized_relobj<64, false>::do_relocate (this=0xaa5f40, symtab=0x7fffffffc720, layout=0x7fffffffc220, of=0xaa9b00) at ../../src/gold/reloc.cc:661 #14 0x00000000006cf654 in gold::Relobj::relocate (this=0xaa5f40, symtab=0x7fffffffc720, layout=0x7fffffffc220, of=0xaa9b00) at ../../src/gold/object.h:833 #15 0x00000000006cf2ac in gold::Relocate_task::run (this=0xca21a0) at ../../src/gold/reloc.cc:233 #16 0x00000000007abe49 in gold::Workqueue::find_and_run_task ( this=0x7fffffffcdb0, thread_number=0) at ../../src/gold/workqueue.cc:319 #17 0x00000000007ac492 in gold::Workqueue::process ( this=0x7fffffffcdb0, thread_number=0) at ../../src/gold/workqueue.cc:495 #18 0x0000000000406382 in main (argc=37, argv=0x7fffffffcfe8) at ../../src/gold/main.cc:247 (gdb) fr 4 #4 0x00000000007d070f in gold::Sized_dwarf_line_info<64, false>::read_header_prolog (this=0x7fffffff68a0, lineptr=0x7ffff7ff8315 "") at ../../src/gold/dwarf_reader.cc:192 192 header_.std_opcode_lengths[0] = 0; (gdb) p header_.std_opcode_lengths $1 = std::__debug::vector of length 0, capacity 14 (gdb) -- 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. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils