This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/22350] New: Attempt to set a breakpoint results in out of bounds access to std::vector<partial_symbol*>


https://sourceware.org/bugzilla/show_bug.cgi?id=22350

            Bug ID: 22350
           Summary: Attempt to set a breakpoint results in out of bounds
                    access to std::vector<partial_symbol*>
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: b7.10110111 at gmail dot com
  Target Milestone: ---

Created attachment 10555
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10555&action=edit
Abort backtrace

I'm using a modified version of stl_vector.h, where I added some assertions
into methods like std::vector::operator[]() which check that the argument fits
actual size of the vector.

When compiling GDB 8.0.50.20171025-git with this setup (GCC 5.4.1), I get the
following assertion failure on any attempt to set a breakpoint:

$ gdb -q -ex 'b main' gdb
Reading symbols from gdb...done.
gdb: /usr/include/c++/5/bits/stl_vector.h:792: std::vector<_Tp,
_Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp,
_Alloc>::size_type) [with _Tp = partial_symbol*; _Alloc =
std::allocator<partial_symbol*>; std::vector<_Tp, _Alloc>::reference =
partial_symbol*&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]:
Assertion `__n<size()' failed.


I'm attaching the full backtrace of aborted GDB.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]