This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/10146] New: breakpoint_objects are not Py_INCREF-ed in the callback gdb_breakpoint_created
- From: "lami4ka at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 11 May 2009 17:42:20 -0000
- Subject: [Bug gdb/10146] New: breakpoint_objects are not Py_INCREF-ed in the callback gdb_breakpoint_created
- Reply-to: sourceware-bugzilla at sourceware dot org
Internally, a copy of the breapoint_object for every new breakpoint seems to be
stored in the bppy_breakpoints, however when stored, it is not Py_INCREF-ed.
So if we create a breakpoint in python: b = gdb.Brekpoint(location), and then
don't save b, it's refcount goes down to 0 and it gets garbage collected. Then
the corresponding entry in bppy_breakpoints[num] gets overwritten and can later
cause a segfault (and it did when I tried to delete this breakpoint later and
create another).
--
Summary: breakpoint_objects are not Py_INCREF-ed in the callback
gdb_breakpoint_created
Product: gdb
Version: archer
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: lami4ka at gmail dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10146
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.