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 693587 - Adding offset to GstSegment deserialize/serialize to fix jump on uninitialized value
Adding offset to GstSegment deserialize/serialize to fix jump on uninitialize...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.0.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-11 13:12 UTC by Tim 'mithro' Ansell
Modified: 2013-02-11 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem. (2.62 KB, patch)
2013-02-11 13:12 UTC, Tim 'mithro' Ansell
none Details | Review

Description Tim 'mithro' Ansell 2013-02-11 13:12:07 UTC
Created attachment 235699 [details] [review]
Patch to fix the problem.

gstvalue: Adding offset to GstSegment serialize/deserialize.
    
    Fixed valgrind complaining about the following uninitialised jump;
    ==25529== Conditional jump or move depends on uninitialised value(s)
    ==25529==    at 0x4EB2B69: gst_segment_to_running_time (gstsegment.c:484)
    ==25529==    by 0x85AF802: gst_base_sink_get_sync_times (gstbasesink.c:1912)
    ==25529==    by 0x85B853F: gst_base_sink_do_sync (gstbasesink.c:2372)
    ==25529==    by 0x85B96D5: gst_base_sink_chain_unlocked.isra.11 (gstbasesink.c:3301)
    ==25529==    by 0x85BADAB: gst_base_sink_chain_main (gstbasesink.c:3446)
    ==25529==    by 0x4E93358: gst_pad_push_data (gstpad.c:3655)
    ==25529==    by 0xA8EBDF6: gst_gdp_depay_chain (gstgdpdepay.c:330)
    ==25529==    by 0x4E93358: gst_pad_push_data (gstpad.c:3655)
    ==25529==    by 0x85BFFCF: gst_base_src_loop (gstbasesrc.c:2723)
    ==25529==    by 0x4EC0DAE: gst_task_func (gsttask.c:316)
    ==25529==    by 0x5731247: g_thread_pool_thread_proxy (gthreadpool.c:309)
    ==25529==    by 0x57309E4: g_thread_proxy (gthread.c:801)
    ==25529==    by 0x59C3E99: start_thread (pthread_create.c:308)
    ==25529==    by 0x5CCCCBC: clone (clone.S:112)
    ==25529==  Uninitialised value was created by a stack allocation
    ==25529==    at 0x4ED172F: gst_value_deserialize (gstvalue.c:4900)
Comment 1 Tim-Philipp Müller 2013-02-11 13:15:50 UTC
I don't think it should be serialized. It should just be set to 0 instead when creating the new segment structure in the deserialising code.
Comment 2 Wim Taymans 2013-02-11 13:21:13 UTC
commit bd65fc00360d71befcc57007b25619ac362a4709
Author: Tim 'mithro' Ansell <mithro@mithis.com>
Date:   Tue Feb 12 00:08:51 2013 +1100

    gstvalue: Adding offset to GstSegment serialize/deserialize.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=693587
Comment 3 Tim-Philipp Müller 2013-02-11 13:22:57 UTC
Sorry, I was confused. It should be serialised.

(I thought it was the old last_stop from 0.10, but that's been renamed to position and offset is something else).