[Bug 750397] CRITICAL: Race condition in GstBus

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sun Jun 26 01:36:01 UTC 2016


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

--- Comment #34 from Matt Gruenke <mgruenke at tycoint.com> ---
(In reply to Jan Schmidt from comment #33)
> It seems to me that removing non-blocking mode from the socket is sufficient
> on Linux, but I don't think so on Windows.

I agree on all points.  Thank you.


> I think we can use a Semaphore object instead on Windows to avoid that.

Good point.  So, CreateSemaphore() with lInitialCount=0 and lMaximumCount=999
(whatever's semaphore's largest supported value).  Then, replace SetEvent()
with ReleaseSemaphore()?

The tricky part is that the concepts of selecting on it and acquiring it are
intertwined.  I'll have a look and see if I can make it work.

Otherwise, the simplest fix is going to be putting a mutex around both
control_pending and WAKE_EVENT()/RELEASE_EVENT().  On Windows, at least.

-- 
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