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 766726 - sigsegv in XGetDeviceProperty
sigsegv in XGetDeviceProperty
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2016-05-20 16:16 UTC by Sebastien Bacher
Modified: 2016-05-30 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom: don't segfault when a device is removed while being configured (1.65 KB, patch)
2016-05-24 14:58 UTC, Sebastien Bacher
accepted-commit_now Details | Review

Description Sebastien Bacher 2016-05-20 16:16:36 UTC
Using current gnome-3-20 code, the wacom plugin segfaults when using the libinput test-touchpad-tap binary

gsd-test-wacom  gdb backtrace 

"#0  0xb7e1acdf in XGetDeviceProperty () at /usr/lib/i386-linux-gnu/libXi.so.6
  • #1 device_set_property
    at gsd-input-helper.c line 61
  • #2 wacom_set_property
    at gsd-wacom-manager.c line 262
  • #3 set_pressurecurve
    at gsd-wacom-manager.c line 301
  • #4 apply_stylus_settings
    at gsd-wacom-manager.c line 593
  • #5 gsd_wacom_manager_add_gdk_device
    at gsd-wacom-manager.c line 852
  • #6 gsd_wacom_manager_add_gdk_device
    at gsd-wacom-manager.c line 1100
  • #7 device_changed_cb
    at gsd-wacom-manager.c line 1147
  • #8 g_cclosure_marshal_VOID__OBJECTv
    at /build/glib2.0-Spm2To/glib2.0-2.48.0/./gobject/gmarshal.c line 2102
  • #9 _g_closure_invoke_va
    at /build/glib2.0-Spm2To/glib2.0-2.48.0/./gobject/gclosure.c line 867
  • #10 g_signal_emit_valist
    at /build/glib2.0-Spm2To/glib2.0-2.48.0/./gobject/gsignal.c line 3294
  • #11 g_signal_emit_by_name
    at /build/glib2.0-Spm2To/glib2.0-2.48.0/./gobject/gsignal.c line 3481

Comment 1 Sebastien Bacher 2016-05-20 16:23:06 UTC
gsd-wacom-manager has a few calls to open_device() which use the result without checking if it's NULL which can happen if the device goes away while configured
Comment 2 Sebastien Bacher 2016-05-24 14:58:15 UTC
Created attachment 328442 [details] [review]
wacom: don't segfault when a device is removed while being configured
Comment 3 Bastien Nocera 2016-05-28 22:17:01 UTC
Review of attachment 328442 [details] [review]:

Please commit to master, gnome-3-20 and gnome-3-18