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 747263 - wayland-keyboard: Disconnect from backend signals on release
wayland-keyboard: Disconnect from backend signals on release
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-02 17:26 UTC by Rui Matos
Modified: 2015-04-09 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland-keyboard: Disconnect from backend signals on release (1.12 KB, patch)
2015-04-02 17:26 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-04-02 17:26:12 UTC
Fixes the crash reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1208526 .
Comment 1 Rui Matos 2015-04-02 17:26:17 UTC
Created attachment 300849 [details] [review]
wayland-keyboard: Disconnect from backend signals on release

Otherwise we'll access freed memory in the handlers.

The wayland keyboard is released when the seat loses the keyboard
capability which happens when leaving the VT so if there are keymap
changes while switched away from the VT we would crash.
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-04-02 17:56:38 UTC
Review of attachment 300849 [details] [review]:

I would prefer explicitly disconnecting -- either by func or by ID -- disconnecting by data is a bit too magical for me. That said, this needs to be fixed.
Comment 3 Rui Matos 2015-04-02 21:23:34 UTC
disconnect_by_func looks better/safer indeed. Pushing, thanks

Attachment 300849 [details] pushed as 4aa74af - wayland-keyboard: Disconnect from backend signals on release