public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/13369] New: exception handling bugs
@ 2011-11-01 15:27 tromey at redhat dot com
  2011-11-01 15:39 ` [Bug python/13369] " pmuldoon at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-11-01 15:27 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13369

             Bug #: 13369
           Summary: exception handling bugs
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tromey@redhat.com
    Classification: Unclassified


A static analyzer found a number of bugs in the Python code.
These are all places where a call to gdb is done that could throw,
where the call is not properly caught in the Python layer.

../../archer/gdb/python/py-breakpoint.c:333: error: function
bppy_set_ignore_count is marked nothrow but can throw
../../archer/gdb/python/py-breakpoint.c:358: info: via call to set_ignore_count
../../archer/gdb/breakpoint.c:12054: info: via call to error
../../archer/gdb/utils.c:830: info: via call to throw_verror

../../archer/gdb/python/python.c:481: error: function gdbpy_decode_line is
marked nothrow but can throw
../../archer/gdb/python/python.c:497: info: via call to get_current_arch
../../archer/gdb/arch-utils.c:758: info: via call to get_selected_frame
../../archer/gdb/frame.c:1360: info: via call to error
../../archer/gdb/utils.c:830: info: via call to throw_verror

../../archer/gdb/python/py-type.c:346: error: function typy_strip_typedefs is
marked nothrow but can throw
../../archer/gdb/python/py-type.c:350: info: via call to check_typedef
../../archer/gdb/gdbtypes.c:1500: info: via call to lookup_symbol
../../archer/gdb/symtab.c:1084: info: via call to lookup_symbol_in_language
../../archer/gdb/symtab.c:1070: info: via call to lookup_symbol_aux
../../archer/gdb/symtab.c:1164: info: via call to error
../../archer/gdb/utils.c:830: info: via call to throw_verror

../../archer/gdb/python/py-value.c:876: error: function valpy_nonzero is marked
nothrow but can throw
../../archer/gdb/python/py-value.c:883: info: via call to check_typedef
../../archer/gdb/gdbtypes.c:1500: info: via call to lookup_symbol
../../archer/gdb/symtab.c:1084: info: via call to lookup_symbol_in_language
../../archer/gdb/symtab.c:1070: info: via call to lookup_symbol_aux
../../archer/gdb/symtab.c:1164: info: via call to error
../../archer/gdb/utils.c:830: info: via call to throw_verror

../../archer/gdb/python/py-type.c:723: error: function typy_template_argument
is marked nothrow but can throw
../../archer/gdb/python/py-type.c:759: info: via call to
typy_legacy_template_argument
../../archer/gdb/python/py-type.c:679: info: via call to
cp_demangled_name_to_comp
../../archer/gdb/cp-name-parser.y:2060: info: via call to cpname_parse
cp-name-parser.c:2049: info: via call to cpname_lex
../../archer/gdb/cp-name-parser.y:1695: info: via call to parse_number
../../archer/gdb/c-exp.y:1546: info: via call to error
../../archer/gdb/utils.c:830: info: via call to throw_verror

../../archer/gdb/python/py-block.c:370: error: function gdbpy_block_for_pc is
marked nothrow but can throw
../../archer/gdb/python/py-block.c:381: info: via call to find_pc_sect_symtab
../../archer/gdb/symtab.c:1784: info: via call to
lookup_minimal_symbol_by_pc_section
../../archer/gdb/minsyms.c:690: info: via call to find_pc_section
../../archer/gdb/objfiles.c:1333: info: via call to update_section_map
../../archer/gdb/objfiles.c:1290: info: via call to filter_overlapping_sections
../../archer/gdb/objfiles.c:1224: info: via call to complaint
../../archer/gdb/complaints.c:252: info: via call to vcomplaint
../../archer/gdb/complaints.c:219: info: via call to fputs_filtered
../../archer/gdb/utils.c:2282: info: via call to fputs_maybe_filtered
../../archer/gdb/utils.c:2203: info: via call to prompt_for_continue
../../archer/gdb/utils.c:2022: info: via call to async_request_quit
../../archer/gdb/event-top.c:835: info: via call to quit
../../archer/gdb/utils.c:1252: info: via call to fatal
../../archer/gdb/utils.c:850: info: via call to throw_vfatal

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


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

* [Bug python/13369] exception handling bugs
  2011-11-01 15:27 [Bug python/13369] New: exception handling bugs tromey at redhat dot com
@ 2011-11-01 15:39 ` pmuldoon at redhat dot com
  2011-11-28 15:50 ` cvs-commit at gcc dot gnu.org
  2011-11-28 17:09 ` pmuldoon at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pmuldoon at redhat dot com @ 2011-11-01 15:39 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13369

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |pmuldoon at redhat dot com
         AssignedTo|unassigned at sourceware    |pmuldoon at redhat dot com
                   |dot org                     |

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


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

* [Bug python/13369] exception handling bugs
  2011-11-01 15:27 [Bug python/13369] New: exception handling bugs tromey at redhat dot com
  2011-11-01 15:39 ` [Bug python/13369] " pmuldoon at redhat dot com
@ 2011-11-28 15:50 ` cvs-commit at gcc dot gnu.org
  2011-11-28 17:09 ` pmuldoon at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-11-28 15:50 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13369

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-11-28 15:49:50 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    pmuldoon@sourceware.org    2011-11-28 15:49:43

Modified files:
    gdb            : ChangeLog 
    gdb/python     : py-block.c py-breakpoint.c py-inferior.c 
                     py-type.c py-value.c python.c 

Log message:
    2011-11-28  Phil Muldoon  <pmuldoon@redhat.com>

    PR python/13369
    PR python/13374

    * python/python.c (gdbpy_decode_line): Do not acquire GIL.
    * python/py-inferior.c (inferior_to_inferior_object): Ditto.
    * python/py-value.c (valpy_nonzero): Use TRY_CATCH to catch GDB
    exceptions.
    * python/py-type.c (typy_strip_typedefs): Ditto.
    (typy_legacy_template_argument): Ditto.
    * python/py-inferior.c (inferior_to_inferior_object): Ditto.
    * python/py-breakpoint.c (bppy_set_ignore_count): Ditto.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13554&r2=1.13555
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-block.c.diff?cvsroot=src&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-breakpoint.c.diff?cvsroot=src&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-inferior.c.diff?cvsroot=src&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-type.c.diff?cvsroot=src&r1=1.30&r2=1.31
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-value.c.diff?cvsroot=src&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/python.c.diff?cvsroot=src&r1=1.77&r2=1.78

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


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

* [Bug python/13369] exception handling bugs
  2011-11-01 15:27 [Bug python/13369] New: exception handling bugs tromey at redhat dot com
  2011-11-01 15:39 ` [Bug python/13369] " pmuldoon at redhat dot com
  2011-11-28 15:50 ` cvs-commit at gcc dot gnu.org
@ 2011-11-28 17:09 ` pmuldoon at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pmuldoon at redhat dot com @ 2011-11-28 17:09 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13369

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.4

--- Comment #2 from Phil Muldoon <pmuldoon at redhat dot com> 2011-11-28 17:08:44 UTC ---
Closed with commit as detailed in comment #1

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


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

end of thread, other threads:[~2011-11-28 17:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01 15:27 [Bug python/13369] New: exception handling bugs tromey at redhat dot com
2011-11-01 15:39 ` [Bug python/13369] " pmuldoon at redhat dot com
2011-11-28 15:50 ` cvs-commit at gcc dot gnu.org
2011-11-28 17:09 ` pmuldoon at redhat 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).