public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/18438] New: PyExc_MemoryError != gdbpy_gdb_memory_error
@ 2015-05-20 21:32 dje at google dot com
  2015-05-26 23:15 ` [Bug python/18438] " cvs-commit at gcc dot gnu.org
  2015-05-26 23:17 ` dje at google dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dje at google dot com @ 2015-05-20 21:32 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 18438
           Summary: PyExc_MemoryError != gdbpy_gdb_memory_error
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com
  Target Milestone: ---

A user is getting the following in a backtrace:

...
#7  0x000000000040bac0 in operator<< <char, std::char_traits<char>,
std::allocator<char> > (__os=warning: RTTI symbol not found for class
'std::ostream'
..., Traceback (most recent call last):
  File "/foo/printers.py", line 38, in to_string
    return ptr.lazy_string (length = length)
MemoryError: Cannot create a lazy string with address 0x0, and a non-zero
length.
__str=
) at bar/string:927
#8  0x000000000040ba55 in main () at baz.cc:10

The RTTI error is a separate bug (IIRC PR 18141, PR 18417 - there are multiple
bugs here, I could be forgetting one).

This bug is the python backtrace being printed when there's a memory error.
That's not supposed to happen.

The bug arises because PyExc_MemoryError is being used instead of
gdbpy_gdb_memory_error. Patch to follow.

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


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

* [Bug python/18438] PyExc_MemoryError != gdbpy_gdb_memory_error
  2015-05-20 21:32 [Bug python/18438] New: PyExc_MemoryError != gdbpy_gdb_memory_error dje at google dot com
@ 2015-05-26 23:15 ` cvs-commit at gcc dot gnu.org
  2015-05-26 23:17 ` dje at google dot com
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-05-26 23:15 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Doug Evans <devans@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498

commit 4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498
Author: Doug Evans <dje@google.com>
Date:   Tue May 26 16:13:04 2015 -0700

    PR python/18438

    gdb/ChangeLog:

        * python/py-lazy-string.c (stpy_convert_to_value): Use
        gdbpy_gdb_memory_error not PyExc_MemoryError.
        (gdbpy_create_lazy_string_object): Ditto.

    gdb/testsuite/ChangeLog:

        * gdb.python/py-lazy-string.c: New file.
        * gdb.python/py-lazy-string.exp: New file.
        * gdb.python/py-prettyprint.c (lazystring) <len>: New member.
        (main): Update.  Add estring3.
        * gdb.python/py-prettyprint.exp: Add tests for strings at address 0.
        * gdb.python/py-prettyprint.py (pp_ls): Handle length.

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


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

* [Bug python/18438] PyExc_MemoryError != gdbpy_gdb_memory_error
  2015-05-20 21:32 [Bug python/18438] New: PyExc_MemoryError != gdbpy_gdb_memory_error dje at google dot com
  2015-05-26 23:15 ` [Bug python/18438] " cvs-commit at gcc dot gnu.org
@ 2015-05-26 23:17 ` dje at google dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dje at google dot com @ 2015-05-26 23:17 UTC (permalink / raw)
  To: gdb-prs

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

dje at google dot com changed:

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

--- Comment #2 from dje at google dot com ---
patch committed

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


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

end of thread, other threads:[~2015-05-26 23:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 21:32 [Bug python/18438] New: PyExc_MemoryError != gdbpy_gdb_memory_error dje at google dot com
2015-05-26 23:15 ` [Bug python/18438] " cvs-commit at gcc dot gnu.org
2015-05-26 23:17 ` dje at google dot com

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