GNOME Bugzilla – Bug 751000
oggdemux: crash with validate.http.media_check.vorbis_theora_1_ogg
Last modified: 2015-06-22 12:10:16 UTC
The validate.http.media_check.vorbis_theora_1_ogg test is raising a crash.
+ Trace 235169
Created attachment 305304 [details] [review] oggdemux: set building_chain to NULL when clearing chains All the chains just have been destroyed, including building_chain which is now invalid. Unsetting ogg->building_chain will prevent a double free crash when the demuxer is being finalized.
Review of attachment 305304 [details] [review]: ::: ext/ogg/gstoggdemux.c @@ +4910,3 @@ } ogg->chains = g_array_set_size (ogg->chains, 0); + ogg->building_chain = NULL; Are you sure that the building_chain has been freed here? Is it guaranteed that it is in the chains array? I couldn't find where it was added to the array in the code.
Review of attachment 305304 [details] [review]: I guess it would make more sense to add ogg->building_chain = NULL; in the function gst_ogg_demux_deactivate_current_chain() where the current chain is being deactivated. GstOggChain *chain = ogg->current_chain; if (!ogg->pullmode) { gst_ogg_chain_free (chain); } So the change can be something like if (!ogg->pullmode) { gst_ogg_chain_free (chain); ogg->current_chain = NULL; }
You're right that's cleaner this way.
Created attachment 305379 [details] [review] oggdemux: set building_chain to NULL when deactivating chain The chain is about to be invalidated so we shouldn't keep it around. Prevent a double free crash when the demuxer is being finalized.
commit a5dcce98aa0c77cf6c31aeb7e2cb0c12abeec1ba Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Mon Jun 15 16:08:10 2015 +0200 oggdemux: set building_chain to NULL when deactivating chain The chain is about to be invalidated so we shouldn't keep it around. Prevent a double free crash when the demuxer is being finalized. https://bugzilla.gnome.org/show_bug.cgi?id=751000