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 719524 - audiofxbaseiirfilter: check if coefficients are provided inside filter lock
audiofxbaseiirfilter: check if coefficients are provided inside filter lock
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.1
Other All
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-29 01:13 UTC by Darryl Gamroth
Modified: 2014-02-22 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for bug report (1.36 KB, patch)
2013-11-29 21:08 UTC, Darryl Gamroth
committed Details | Review
audiofxbaseiirfilter: check if coefficients are provided inside filter lock (1.42 KB, patch)
2014-02-22 19:06 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Darryl Gamroth 2013-11-29 01:13:56 UTC
In transform_ip the filter coefficients are checked outside of the lock so it's possible for the values to be NULL.  Move the check inside the lock.
Comment 1 Darryl Gamroth 2013-11-29 21:08:30 UTC
Created attachment 263164 [details] [review]
Patch for bug report

Sorry, looks like I forgot to attach the patch.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-08 21:59:24 UTC
I think the
if (filter->a == NULL || filter->b == NULL) {
check is there to prevent a programming error. IMHO we should ensure that the value is != NULL when chaning the value, e.g. in
gst_audio_fx_base_iir_filter_set_coefficients().
Comment 3 Darryl Gamroth 2014-02-10 01:17:27 UTC
The check is valid but it occurs outside the lock so while it's not possible to call filter->process while the variables are NULL it is possible for the check to fail if gst_audio_fx_base_iir_filter_set_coefficients is called while playing.  Moving the check inside the lock prevents the race condition from occurring.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-22 19:06:00 UTC
Right, this is better then having the race. An alternative could the to not allow setting a/b to NULL via gst_audio_fx_base_iir_filter_set_coefficients(). Applying the patch for now.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-22 19:06:28 UTC
The following fix has been pushed:
7a65277 audiofxbaseiirfilter: check if coefficients are provided inside filter lock
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-22 19:06:36 UTC
Created attachment 270003 [details] [review]
audiofxbaseiirfilter: check if coefficients are provided inside filter lock