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 642481 - Invalid reads during menu invocation
Invalid reads during menu invocation
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-16 16:52 UTC by Milan Crha
Modified: 2011-02-22 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2011-02-16 16:52:05 UTC
Run this command:
   $ G_SLICE=always-malloc valgrind gtk3-demo

When it's up and running, choose the "Application main window" demo (double click its name), and in the new window press Alt+F for a file menu. Valgrind fills console with four invalid read reports like this one:

==12319== Invalid read of size 1
==12319==    at 0x4A07480: memcpy (mc_replace_strmem.c:602)
==12319==    by 0x3121E0A35D: XIGrabDevice (in /usr/lib64/libXi.so.6.1.0)
==12319==    by 0x535914F: gdk_x11_device_xi2_grab (gdkdevice-xi2.c:409)
==12319==    by 0x530849A: gdk_device_grab (gdkdevice.c:1239)
==12319==    by 0x4DABED2: popup_grab_on_window (gtkmenu.c:1419)
==12319==    by 0x4DAC2AD: gtk_menu_popup_for_device (gtkmenu.c:1589)
==12319==    by 0x4DAC88B: gtk_menu_popup (gtkmenu.c:1780)
==12319==    by 0x4DBBC9C: gtk_menu_item_real_popup_submenu (gtkmenuitem.c:1859)
==12319==    by 0x4DBBFCF: _gtk_menu_item_popup_submenu (gtkmenuitem.c:1958)
==12319==    by 0x4DBB591: gtk_real_menu_item_select (gtkmenuitem.c:1676)
==12319==    by 0x6565418: g_cclosure_marshal_VOID__VOID (gmarshal.c:79)
==12319==    by 0x654B882: g_type_class_meta_marshal (gclosure.c:878)
==12319==  Address 0xe508384 is 0 bytes after a block of size 4 alloc'd
==12319==    at 0x4A04896: calloc (vg_replace_malloc.c:418)
==12319==    by 0x3121E0A275: XIGrabDevice (in /usr/lib64/libXi.so.6.1.0)
==12319==    by 0x535914F: gdk_x11_device_xi2_grab (gdkdevice-xi2.c:409)
==12319==    by 0x530849A: gdk_device_grab (gdkdevice.c:1239)
==12319==    by 0x4DABED2: popup_grab_on_window (gtkmenu.c:1419)
==12319==    by 0x4DAC2AD: gtk_menu_popup_for_device (gtkmenu.c:1589)
==12319==    by 0x4DAC88B: gtk_menu_popup (gtkmenu.c:1780)
==12319==    by 0x4DBBC9C: gtk_menu_item_real_popup_submenu (gtkmenuitem.c:1859)
==12319==    by 0x4DBBFCF: _gtk_menu_item_popup_submenu (gtkmenuitem.c:1958)
==12319==    by 0x4DBB591: gtk_real_menu_item_select (gtkmenuitem.c:1676)
==12319==    by 0x6565418: g_cclosure_marshal_VOID__VOID (gmarshal.c:79)
==12319==    by 0x654B882: g_type_class_meta_marshal (gclosure.c:878)
Comment 1 Matthias Clasen 2011-02-17 00:18:34 UTC
libX11 problem, not GTK+
Comment 2 Milan Crha 2011-02-17 07:54:23 UTC
I do not think so, if I try the same with gtk2 gtk-demo, then I do not get these. Did you really change so much in popup menus in gtk3 that it uncovered such bug in X11? gtk2 version: gtk2-2.22.0-1.fc14.1.x86_64
Comment 3 Matthias Clasen 2011-02-17 15:08:39 UTC
That is because gtk2 does not use xi2.
Comment 4 Peter Hutterer 2011-02-22 23:42:08 UTC
libXi bug, patch proposed: http://patchwork.freedesktop.org/patch/4239/