[Bug 750397] CRITICAL: Race condition in GstBus

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 28 21:00:22 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=750397

--- Comment #57 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 330504:
 --> (https://bugzilla.gnome.org/review?bug=750397&attachment=330504)

::: gst/gstpoll.c
@@ +206,1 @@
+  if (set->control_pending > 0) {

There is also an asymmetry here now: release_wakeup() might not change the
value, raise_wakeup() will always change the value. If I'm not missing
anything, this will cause release_wakeup() followed by raise_wakeup() to put
one additional byte into the socket that is never going to be read.

I think in release_wakeup() you always have to decrement for symmetry between
the two. Basically:

if (--set->control_pending == 0) {
  result = RELEASE_EVENT (set);
} else if (set->control_pending < 0) {
  result = FALSE;
} else {
  result = TRUE;
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list