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 789564 - segfault in _gdk_wayland_cursor_set_scale
segfault in _gdk_wayland_cursor_set_scale
Status: RESOLVED DUPLICATE of bug 775217
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-27 15:45 UTC by Vasilis Liaskovitis
Modified: 2017-10-27 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (3.96 KB, text/plain)
2017-10-27 15:45 UTC, Vasilis Liaskovitis
Details

Description Vasilis Liaskovitis 2017-10-27 15:45:06 UTC
Created attachment 362419 [details]
backtrace

I consistently see a segfault in _gdk_wayland_cursor_set_scale using an app (virt-viewer). cursor->name is NULL and g_str_equal tries to dereference it, see backtrace attached. This is with 3.22.4, but should happen in master as well.

Commit db49d12fcf3 standarized the name of blank cursors to "none" in _gdk_wayland_display_get_cursor_for_name_with_scale.

I assume the problem is that _gdk_wayland_display_get_cursor_for_surface can still create a blank cursor with NULL name.
Comment 1 Matthias Clasen 2017-10-27 15:48:42 UTC
There is no g_str_equal call in gdk_wayland_cursor_set_scale. I changed it to use g_strcmp0, which is NULL-safe
Comment 2 Vasilis Liaskovitis 2017-10-27 16:07:30 UTC
(In reply to Matthias Clasen from comment #1)
> There is no g_str_equal call in gdk_wayland_cursor_set_scale. I changed it
> to use g_strcmp0, which is NULL-safe

oh right, sorry for the noise, i just saw bug#775217 as well. Closing if there are no objections.

*** This bug has been marked as a duplicate of bug 775217 ***