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 759518 - yadif: Fix memory leak and mishandling.
yadif: Fix memory leak and mishandling.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-15 23:22 UTC by Vineeth
Modified: 2015-12-16 08:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix gvalue memory leak (942 bytes, patch)
2015-12-15 23:27 UTC, Vineeth
committed Details | Review
vf_yadif: Fix illegal memory access. (1.55 KB, patch)
2015-12-15 23:28 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-12-15 23:22:39 UTC
This bug deals with memory leaks/mishandling in yadif plugin.
Comment 1 Vineeth 2015-12-15 23:27:58 UTC
Created attachment 317461 [details] [review]
Fix gvalue memory leak

When testing the example pipeline of yadif with valgrind, found the below memory leak

==11656== Thread 1:
==11656== 112 bytes in 4 blocks are definitely lost in loss record 2,187 of 2,393
==11656==    at 0x402C17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==11656==    by 0x421CBE2: g_malloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==11656==    by 0x4233281: g_slice_alloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==11656==    by 0x41E9219: g_array_sized_new (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==11656==    by 0x41E934F: g_array_new (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==11656==    by 0x40EBF9A: gst_value_init_list_or_array (gstvalue.c:284)
==11656==    by 0x41B1B7D: g_value_reset (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.4002.0)
==11656==    by 0x41741A3: gst_yadif_transform_caps (gstyadif.c:246)
==11656==    by 0x616CA1C: gst_base_transform_transform_caps (gstbasetransform.c:536)
==11656==    by 0x6171CFA: gst_base_transform_default_query (gstbasetransform.c:757)
==11656==    by 0x616EF5B: gst_base_transform_query (gstbasetransform.c:1622)
==11656==    by 0x40A97F9: gst_pad_query (gstpad.c:3898)
Comment 2 Vineeth 2015-12-15 23:28:51 UTC
Created attachment 317462 [details] [review]
vf_yadif: Fix illegal memory access.

When testing yadif plugin, found the below memory mishandling

==12206== Conditional jump or move depends on uninitialised value(s)
==12206==    at 0x4174BA5: yadif_filter (vf_yadif.c:98)
==12206==    by 0x4174628: gst_yadif_transform (gstyadif.c:318)
==12206==    by 0x656C5B6: default_generate_output (gstbasetransform.c:2180)
==12206==    by 0x656F08C: gst_base_transform_chain (gstbasetransform.c:2333)
==12206==    by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153)
==12206==    by 0x40AB866: gst_pad_push (gstpad.c:4524)
==12206==    by 0x416EB99: gst_interlace_chain (gstinterlace.c:780)
==12206==    by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153)
==12206==    by 0x40AB866: gst_pad_push (gstpad.c:4524)
==12206==    by 0x65675A2: gst_base_src_loop (gstbasesrc.c:2845)
==12206==    by 0x40D9EA8: gst_task_func (gsttask.c:331)
==12206==    by 0x40DB04E: default_func (gsttaskpool.c:68)
Comment 3 Sebastian Dröge (slomo) 2015-12-16 08:35:29 UTC
commit 50978ccd1ae2e4055d40112aa4e019b48f1952eb
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Wed Dec 16 08:25:19 2015 +0900

    yadif: Fix illegal memory access
    
    When applying the spatial prediction, there is an illegal access of -1 index of array.
    Hence adding a condition to avoid this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759518

commit eb7deb44181ed3bebc57de32ab43119add9633e8
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Wed Dec 16 08:22:00 2015 +0900

    yadif: Fix gvalue memory leak
    
    gvalue variable should be unset instead of reset.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759518