[Webkit-unassigned] [Bug 176154] New: [GTK][Wayland] Crash when gdk_keymap_get_entries_for_keyval returns TRUE but n_keys=0

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 31 02:43:54 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=176154

            Bug ID: 176154
           Summary: [GTK][Wayland] Crash when
                    gdk_keymap_get_entries_for_keyval returns TRUE but
                    n_keys=0
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org

I think this is actually a GTK+ bug (I'll file a bug report), but in Wayland gdk_keymap_get_entries_for_keyval() can return TRUE with n_keys=0. We have several places in WebKit where we just check the return value of gdk_keymap_get_entries_for_keyval() and then use the returned array to get the first position assuming it has at least one item. This has always worked in X11 because the GDK X11 backend does the right thing, but it's crashing in Wayland now. It should be fixed in GTK+ but in the meantime it's easy to workaround by also checking n_keys > 0.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170831/ac814303/attachment.html>


More information about the webkit-unassigned mailing list