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 python/10666] New: reloading Python convenience function segfaults with invalid free


# x.py
import gdb
def f():
    class Fn(gdb.Function):
        def invoke(self):
            return 3.14159
    Fn("pi")
f()

$ gdb
(gdb) python import x
(gdb) python reload(x)
Segmentation fault

valgrind says:
==19973== Invalid free() / delete / delete[]
==19973==    at 0x4025DFA: free (vg_replace_malloc.c:323)
==19973==    by 0x80E86F3: delete_cmd (cli-decode.c:671)
==19973==    by 0x80E87CA: add_cmd (cli-decode.c:157)
==19973==    by 0x8133737: add_internal_function (value.c:1419)
==19973==    by 0x8106A6D: fnpy_init (python-function.c:121)
==19973==    by 0x4139F54: (within /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x40DA98B: PyObject_Call (in /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x4180617: PyEval_EvalFrameEx (in /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x4183B4E: PyEval_EvalFrameEx (in /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x418490F: PyEval_EvalCodeEx (in /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x4184A72: PyEval_EvalCode (in /usr/lib/libpython2.6.so.1.0)
==19973==    by 0x4196D5C: PyImport_ExecCodeModuleEx (in
/usr/lib/libpython2.6.so.1.0)
==19973==  Address 0x82ea90c is not stack'd, malloc'd or (recently) free'd

-- 
           Summary: reloading Python convenience function segfaults with
                    invalid free
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jason dot orendorff at gmail dot com
                CC: gdb-prs at sourceware dot org


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

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