This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/10146] New: breakpoint_objects are not Py_INCREF-ed in the callback gdb_breakpoint_created


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]