[Bug 660357] New: [gst-python] Fix decref of null pointer
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Sep 28 06:24:09 PDT 2011
https://bugzilla.gnome.org/show_bug.cgi?id=660357
GStreamer | gst-python | git
Summary: [gst-python] Fix decref of null pointer
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-python
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: ylatuya at gmail.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=197661)
View: https://bugzilla.gnome.org/attachment.cgi?id=197661
Review: https://bugzilla.gnome.org/review?bug=660357&attachment=197661
Fix decref of null pointer
I caught a segfault in gst-python that I can't reproduce, but I have a
coredump. It's seems that if the call to the callback fails, args can be NULL.
Attached patch.
(gdb) frame 0
#0 pad_block_callback_marshal (pad=0x8ac21a0, blocked=1, user_data=0xb778a4ec)
at gstpad.override:1393
1393 Py_DECREF(args);
(gdb) bt
#0 pad_block_callback_marshal (pad=0x8ac21a0, blocked=1, user_data=0xb778a4ec)
at gstpad.override:1393
#1 0x0096a8b2 in handle_pad_block (pad=0x8ac21a0) at gstpad.c:4000
#2 0x009766c8 in gst_pad_push_event (pad=0x8ac21a0, event=0x8b48600) at
gstpad.c:4951
#3 0x00814aca in gst_base_src_loop (pad=0x8ac21a0) at gstbasesrc.c:2403
#4 0x0099e5b4 in gst_task_func (task=0x8c92250) at gsttask.c:271
#5 0x0099fef7 in default_func (tdata=0x8d82d00, pool=0x874e008) at
gsttaskpool.c:70
#6 0x06fa0968 in g_thread_pool_push () from /lib/libglib-2.0.so.0
#7 0x06f9ee7f in g_thread_create_full () from /lib/libglib-2.0.so.0
#8 0x005c945b in start_thread () from /lib/libpthread.so.0
#9 0x00520c4e in clone () from /lib/libc.so.6
(gdb) l
1381 callback = PyTuple_GetItem(py_user_data, 0);
1382 args = Py_BuildValue("(NO)",
1383 pygobject_new(G_OBJECT(pad)),
1384 blocked ? Py_True : Py_False);
1385
1386 {
1387 PyObject *tmp = args;
1388 args = PySequence_Concat(tmp, PyTuple_GetItem(py_user_data,
1));
1389 Py_DECREF (tmp);
1390 }
1391
1392 ret = PyObject_CallObject(callback, args);
1393 Py_DECREF(args);
1394
1395 if (!ret)
1396 PyErr_Print();
1397 else
1398 Py_DECREF(ret);
1399
1400 pyg_gil_state_release(state);
1401 }
1402
1403 static PyObject *
1404 _wrap_gst_pad_set_blocked_async (PyGObject *self, PyObject *args)
1405 {
(gdb) print *args
Cannot access memory at address 0x0
(gdb) print *ret
Cannot access memory at address 0x0
(gdb)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list