After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782050 - basetransform/adapter: Check if meta transform_func is NULL before using it
basetransform/adapter: Check if meta transform_func is NULL before using it
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 1.12.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-02 08:48 UTC by Frédéric Dalleau
Modified: 2017-05-02 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal (2.09 KB, patch)
2017-05-02 08:48 UTC, Frédéric Dalleau
committed Details | Review

Description Frédéric Dalleau 2017-05-02 08:48:16 UTC
Created attachment 350849 [details] [review]
Patch proposal

The following crash occured while running Webkit to play video on iMX.6.

0x00000000 in ?? ()
0x73f8d7d8 in foreach_metadata (inbuf=0xc9b020, meta=0x474b2490,
                  user_data=<optimized out>) at gstbasetransform.c:1781
0x73eb3ea8 in gst_buffer_foreach_meta (buffer=buffer@entry=0xc9b020,
                  func=0x73f8d705 <foreach_metadata>,
                  user_data=user_data@entry=0x474b24d4)
                  at gstbuffer.c:2234

Some investigation showed that the iMX.6 plugin was not implementing a function :
https://github.com/Freescale/gstreamer-imx/blob/master/src/vpu/vpu_framebuffer_meta.c#L65

We used this patch to avoid the issue in gstreamer core.

That could relate to #781652
Let me know what you think.
Comment 1 Tim-Philipp Müller 2017-05-02 09:09:00 UTC
Bumping up, we might want to consider this for 1.12
Comment 2 Sebastian Dröge (slomo) 2017-05-02 11:28:03 UTC
commit 733de3190b98f9fb7c9b7240ad2d2abb104a8c8a
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue May 2 14:27:14 2017 +0300

    adapter: Check if meta transform_func is NULL before using it
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782050

commit ca7fa6a661d8a394ef1ae6f28a09a0e35fb0ab3f
Author: Frédéric Dalleau <frederic.dalleau@collabora.com>
Date:   Tue May 2 10:32:54 2017 +0200

    basetransform: Check if meta transform_func is NULL before using it
    
    An untested pointer segfaulted in webkit while playing video
    on imx6 sabrelite. It turned out that the imx plugin didn't
    implement the meta transform function.
    
    The following GST_DEBUG trace was visible:
    gstbasetransform.c:1779:foreach_metadata:<conv2> copy metadata
                                                    GstImxVpuBufferMetaAPI
    
    Thread 26 vqueue:src received signal SIGSEGV, Segmentation fault.
    
    (gdb) bt
     0x00000000 in ?? ()
     0x73f8d7d8 in foreach_metadata (inbuf=0xc9b020, meta=0x474b2490,
                      user_data=<optimized out>) at gstbasetransform.c:1781
     0x73eb3ea8 in gst_buffer_foreach_meta (buffer=buffer@entry=0xc9b020,
                      func=0x73f8d705 <foreach_metadata>,
                      user_data=user_data@entry=0x474b24d4)
                      at gstbuffer.c:2234
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782050