GNOME Bugzilla – Bug 748321
gstinfo: gst_debug_unset_threshold_for_name() is an infinite loop for more than one list entry
Last modified: 2015-04-23 10:23:58 UTC
Created attachment 302172 [details] [review] test case The list iteration code contains an infinite loop triggered if there is more than one item in the list and the first element is removed. Two patches attache: 0001 - test case 0002 - proposed fix
Created attachment 302173 [details] [review] proposed fix
The bug was discovered in 1.4, but exists in master as well. The patches are against master.
Thanks a lot, pushed: commit 6aee4af0346dfc5054da5ec71f4fddbebd8b9305 Author: Jason Litzinger <jlitzinger@control4.com> Date: Wed Apr 22 11:04:06 2015 -0600 tests: info: add test case to reproduce infinite loop gst_debug_unset_threshold_for_name() used to go into an infinite loop when there was more than one category in the list. This test captures the problem by failing via timeout. https://bugzilla.gnome.org/show_bug.cgi?id=748321 commit 1b881ecc26e3eeebf35ee042e170367ae228b26f Author: Jason Litzinger <jlitzinger@control4.com> Date: Wed Apr 22 12:03:33 2015 -0600 gstinfo: fix infinite loop in gst_debug_unset_threshold_for_name() Ensure iterator is advanced. The current list iteration code only advances the iterator (walk) if a match is found, which results in an infinite loop when more than one entry exists in the list. https://bugzilla.gnome.org/show_bug.cgi?id=748321