gstreamer/tests/check/gst
Michael Olbrich 1206a60bac bus: clear bus->priv->signal_watch immediately when the source is removed
There is a race-condition that can trigger the assertion in
gst_bus_add_signal_watch_full():

If gst_bus_add_signal_watch_full() is called immediately after
gst_bus_remove_signal_watch() then bus->priv->signal_watch may still be set
because gst_bus_source_dispose() or gst_bus_source_finalize() was not yet
called.
This happens if the corresponding GMainContext has the source queued for
dispatch. In this case, the following dispatch will only unref and delete
the signal_watch because it was already destroyed. Any pending messages
will remain until a new watch is installed.

So bus->priv->signal_watch can be cleared immediately when the watch is
removed. This avoid the race condition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/543>
2020-06-24 15:08:59 +02:00
..
capslist.h gstvalue: Add GstFlagSet type 2015-05-25 16:23:33 +10:00
gst.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstabi.c tests: abi: fix abi test on 64-bit Windows 2018-01-11 12:04:31 +00:00
gstatomicqueue.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstbin.c identity, clocksync: implement provide_clock 2020-06-05 11:28:12 +00:00
gstbuffer.c tests: fix leak in buffer test_wrapped_bytes test 2019-03-06 09:04:54 +00:00
gstbufferlist.c bufferlist: foreach: always remove as parent if buffer is changed 2020-03-18 14:43:08 +01:00
gstbufferpool.c tests: bufferpool: add dead lock test for buffer discard 2020-05-14 07:04:02 +00:00
gstbus.c bus: clear bus->priv->signal_watch immediately when the source is removed 2020-06-24 15:08:59 +02:00
gstcaps.c caps: Don't assert in fixate() on EMPTY/ANY caps and document EMPTY/ANY behaviour on more functions 2020-03-09 10:10:09 +00:00
gstcapsfeatures.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstchildproxy.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstclock.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstcontext.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstcontroller.c documentation: fix a number of typos 2019-10-06 11:12:11 -04:00
gstcpp.cc tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstdatetime.c check: Fix datetime unit test for builds without assert 2020-06-12 15:02:13 +02:00
gstdeinit.c Skip gst_deinit() if gstreamer was not initialized properly 2017-12-24 16:21:38 +01:00
gstdevice.c Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:49:14 +02:00
gstelement.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gstelementfactory.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gstevent.c event: Add unit test for INSTANT_RATE_CHANGE and INSTANT_RATE_SYNC_TIME 2020-06-11 23:16:30 +09:00
gstghostpad.c documentation: fix a number of typos 2019-10-06 11:12:11 -04:00
gstindex.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstinfo.c tests: info: Fix thread-id pattern matching on Windows 2020-03-02 04:16:50 +00:00
gstiterator.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstmemory.c Fix typos in comments and docs 2018-05-01 11:18:03 +01:00
gstmessage.c message: Add unit test for GST_MESSAGE_RATE_CHANGE 2020-06-11 23:16:33 +09:00
gstmeta.c gstbuffer: store meta in add order 2019-03-04 12:57:02 +00:00
gstminiobject.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstobject.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gstpad.c gstpad: Probes that return HANDLED can reset the data info field 2019-05-16 15:13:48 +02:00
gstparamspecs.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gstpipeline.c pipeline: Call gst_task_cleanup_all() before checking reference counts after shutdown 2019-01-03 14:05:31 +00:00
gstplugin.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstpoll.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstpreset.c Source code typo fixes 2018-05-01 11:25:21 +01:00
gstprintf.c check: Don't leak test string 2020-05-08 12:10:38 +02:00
gstpromise.c check: gst_promise_reply() takes ownership 2020-05-08 12:10:38 +02:00
gstprotection.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstquery.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gstregistry.c Fix FSF address 2012-11-03 20:44:48 +00:00
gstsegment.c segment: Add unit test for GST_SEEK_FLAG_INSTANT_RATE_CHANGE 2020-06-11 10:53:59 +09:00
gststream.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gststructure.c tests: Add more int range fixation tests 2019-01-09 23:03:08 +00:00
gstsystemclock.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gsttag.c taglist: Fix crash when comparing two lists of the same length but with different items 2020-05-08 11:04:14 +03:00
gsttagsetter.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gsttask.c task: Introduce gst_task_resume() API 2020-04-01 15:13:59 +00:00
gsttoc.c tests: include config.h and don't include unix headers 2017-11-24 13:41:20 +01:00
gsttocsetter.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gsttracerrecord.c Use gst_object_unref() / gst_object_clear() instead of the GObject ones 2020-04-20 16:28:52 +00:00
gsturi.c check: uri: Check return value 2020-05-08 12:11:20 +02:00
gstutils.c utils: expose GstPluginAPIFlags 2020-06-06 00:38:29 +02:00
gstvalue.c value: Fix comparison of int/int64 ranges 2020-05-25 08:29:21 +02:00
struct_arm.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_hppa.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_i386.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_i386w.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_ppc32.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_ppc64.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_sparc.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_x86_64.h meta: remove unnecessary padding for GstMetaInfo struct 2016-12-05 20:35:41 +00:00
struct_x86_64w.h tests: abi: fix abi test on 64-bit Windows 2018-01-11 12:04:31 +00:00