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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

tromey at sourceware dot org
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.
Reply | Threaded
Open this post in threaded view
|

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

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

--- Comment #1 from Ruslan <b7.10110111 at gmail dot com> ---
Test system is Kubuntu 14.04 amd64.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

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

tromey at sourceware dot org
In reply to this post by tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22350

Ruslan <b7.10110111 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Ruslan <b7.10110111 at gmail dot com> ---
Fixed by commit 47fea877452b84b94ac6ffb26f194f12845526fa.

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