public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values
@ 2015-07-06 13:50 rw at firstpr dot com.au
  2015-07-06 13:52 ` [Bug c++/18627] " rw at firstpr dot com.au
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rw at firstpr dot com.au @ 2015-07-06 13:50 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18627
           Summary: MI -var-list-children on not-yet-created vector
                    crashes gdb and/or provides invalid list of children
                    and their values
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: rw at firstpr dot com.au
  Target Milestone: ---

Created attachment 8414
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8414&action=edit
C++ test program

My recent bug 18623 concerns C++ Containers Library objects such as vectors of
vectors, and makes it impossible for me to debug programs with such variables
with gdb under Codelite.

This second bug prevents me from debugging with gdb under NetBeans 8.0.2 if the
program contains even simpler use of the Containers Library, such as a vector
of ints.

As far as I can tell, NetBeans is making reasonable requests of gdb. NetBeans
will ask gdb to make a variable object for a variable the inferior has not yet
created. gdb responds by doing so, and it clearly knows the nature of the
variable.

NetBeans then uses -var-list-children on this object and bad things happen. If
it uses this command first, gdb crashes.

If it first gives a "-var-update --all-values *" command, and then gives:
"-var-list-children --all-values "var1" 0 100", then gdb responds as if there
are 100 children of this not-yet created variable, with values evidently read
from unitialized RAM.

Then, when NetBeans gives another "-var-update --all-values *", gdb crashes.

This crashed gdb chews close to 100% CPU and gobbles memory continually. In
some cases I couldn't figure out how to kill it, and had to reboot the system.

I have attached:

1 - Source code of the test program.

After posting this message, I will attach:

2 - Complete instructions on reproducing the fault via a command line session
with gdb. (NetBeans is not required.) This includes instructions on
establishing that printers.py is working fine, since once the vector has been
created, gdb is perfectly capable of reporting the vectors (or a deque's)
structure and the values of its int children.

3 - Annotated debugger console log file (in /tmp/) from a NetBeans session
which did not crash gdb.

4 - Annotated log file from a NetBeans session which crashed gdb.

Please see bug 18623 for background on the recent trunk snapshot version of gdb
I am using, from 2015-07-02.

>From the above, I think an experienced gdb developer will be able to quickly
identify the problem. Hopefully it will be reasonably easy to fix.

I don't like my chances of trying to fix it myself, since I am unfamiliar with
this project. Any fix I developed would be at high risk of causing further
trouble.

Thanks for gdb!

- Robin

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


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

* [Bug c++/18627] MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values
  2015-07-06 13:50 [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values rw at firstpr dot com.au
@ 2015-07-06 13:52 ` rw at firstpr dot com.au
  2015-07-06 13:53 ` rw at firstpr dot com.au
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rw at firstpr dot com.au @ 2015-07-06 13:52 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Robin Whittle <rw at firstpr dot com.au> ---
Created attachment 8415
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8415&action=edit
Instructions for reproducing the problems via command line gdb session

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


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

* [Bug c++/18627] MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values
  2015-07-06 13:50 [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values rw at firstpr dot com.au
  2015-07-06 13:52 ` [Bug c++/18627] " rw at firstpr dot com.au
  2015-07-06 13:53 ` rw at firstpr dot com.au
@ 2015-07-06 13:53 ` rw at firstpr dot com.au
  2015-07-06 13:54 ` rw at firstpr dot com.au
  3 siblings, 0 replies; 5+ messages in thread
From: rw at firstpr dot com.au @ 2015-07-06 13:53 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Robin Whittle <rw at firstpr dot com.au> ---
Created attachment 8417
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8417&action=edit
NetBeans debug log file where gdb did crash

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


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

* [Bug c++/18627] MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values
  2015-07-06 13:50 [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values rw at firstpr dot com.au
  2015-07-06 13:52 ` [Bug c++/18627] " rw at firstpr dot com.au
@ 2015-07-06 13:53 ` rw at firstpr dot com.au
  2015-07-06 13:53 ` rw at firstpr dot com.au
  2015-07-06 13:54 ` rw at firstpr dot com.au
  3 siblings, 0 replies; 5+ messages in thread
From: rw at firstpr dot com.au @ 2015-07-06 13:53 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Robin Whittle <rw at firstpr dot com.au> ---
Created attachment 8416
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8416&action=edit
NetBeans debug log file where gdb did not crash

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


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

* [Bug c++/18627] MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values
  2015-07-06 13:50 [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values rw at firstpr dot com.au
                   ` (2 preceding siblings ...)
  2015-07-06 13:53 ` rw at firstpr dot com.au
@ 2015-07-06 13:54 ` rw at firstpr dot com.au
  3 siblings, 0 replies; 5+ messages in thread
From: rw at firstpr dot com.au @ 2015-07-06 13:54 UTC (permalink / raw)
  To: gdb-prs

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

Robin Whittle <rw at firstpr dot com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rw at firstpr dot com.au

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


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

end of thread, other threads:[~2015-07-06 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 13:50 [Bug c++/18627] New: MI -var-list-children on not-yet-created vector crashes gdb and/or provides invalid list of children and their values rw at firstpr dot com.au
2015-07-06 13:52 ` [Bug c++/18627] " rw at firstpr dot com.au
2015-07-06 13:53 ` rw at firstpr dot com.au
2015-07-06 13:53 ` rw at firstpr dot com.au
2015-07-06 13:54 ` rw at firstpr dot com.au

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).