[Bug 763762] New: crash due to gst_iterator_fold which lacks error handling.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 16 15:35:18 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=763762

            Bug ID: 763762
           Summary: crash due to gst_iterator_fold which lacks error
                    handling.
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: kit.park at youview.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Hello,

I have seen a crash when do pipeline destruction which caused by our own
problem. However, as far as I see, this reveals the lack of handling in GST
since gst_iterator_fold() unset the uninitialized value in case of errors and
which is wrong. Hence a crash.

GstIteratorResult
gst_iterator_fold (GstIterator * it, GstIteratorFoldFunction func,
    GValue * ret, gpointer user_data)
{
  GValue item = { 0, };
  GstIteratorResult result;

  while (1) {
      // ...
      case GST_ITERATOR_RESYNC:
      case GST_ITERATOR_ERROR:
        goto fold_done;
      case GST_ITERATOR_DONE:
        goto fold_done;
    }
  }

fold_done:
  g_value_unset (&item);

  return result;
}

#0  0x763c2c34 in g_value_unset () from /lib/libgobject-2.0.so.0
#1  0x742973ec in gst_iterator_fold (it=0x0, func=0x742562e0
<bin_query_duration_fold>, ret=0x7422a940, user_data=0x7422a9b8) at
gstiterator.c:628
#2  0x742552a0 in bin_iterate_fold (bin=0x5761b8, iter=0x0,
fold_init=0x7424fdf8 <bin_query_min_max_init>, fold_done=0x742564b4
<bin_query_duration_done>, fold_func=0x742562e0 <bin_query_duration_fold>,
fold_data=0x7422a9b8, default_return=0) at gstbin.c:3997
#3  0x74258b08 in gst_bin_query (element=0x5761b8, query=0x57eef0) at
gstbin.c:4115

Hope this is clear to fix that.
Many thanks

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