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 759079 - GtkComboBox triggers segmentation fault in update_menu_sensitivity for single entry submenu
GtkComboBox triggers segmentation fault in update_menu_sensitivity for single...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
https://github.com/Beep6581/RawTherap...
Depends on:
Blocks:
 
 
Reported: 2015-12-06 02:33 UTC by Adam Reichold
Modified: 2016-01-15 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch removing the header and separator handling (1.57 KB, patch)
2015-12-06 10:55 UTC, Adam Reichold
committed Details | Review

Description Adam Reichold 2015-12-06 02:33:16 UTC
GtkComboBox used to draw a selectable header and separator on the top of each submenu which seems to have been removed in the latest CSS styling changes for that widget, specifically commits [1] and [2].

However, the function update_menu_sensitivity still assume the header and separator to be present and will trigger a memory access violation if a submenu with a single element is used. More specifically, [3] fails as 'child->next' is null as the proper child item is actually the only child item so that even though 'child == children' is true, there is no next item which used to be the separator.

[1] https://git.gnome.org/browse/gtk+/commit/gtk/gtkcombobox.c?id=d071415d56e507dec36ea39fb48590c5c09ad7c9

[2] https://git.gnome.org/browse/gtk+/commit/gtk/gtkcombobox.c?id=fcb26376dfc317f0f45ec3a5d94fb697003b64e3

[3] https://git.gnome.org/browse/gtk+/tree/gtk/gtkcombobox.c#n2105
Comment 1 Adam Reichold 2015-12-06 10:55:37 UTC
Created attachment 316834 [details] [review]
Patch removing the header and separator handling

This patch removes the special handling of the header and separator in the combo box, i.e. within update_menu_sensitivity, and for me, fixes the problem without any obvious negative side effects.
Comment 2 Adam Reichold 2015-12-07 20:11:58 UTC
Thank you for reviewing and committing this so fast! As only 3.18.x seems affected and all single entry sub menu combo boxes crashing seems like a potentially large set of affected programs, is it possible to cherry pick this for 3.18.x?