In WaylandCompositor.cpp's initializeEGL(), eglBindWaylandDisplayWL() is called if eglGetProcAddress() returns any value for it. This causes a crash on newer Mesa when using software rendering: swrast drivers do not provide BindWaylandDisplay (as they rely on wl_shm instead of Mesa extensions), and newer Mesa asserts that the extension is enabled when the entrypoint is called. The trivial fix would be to check for the extension's presence and fail initializeEGL() if they are not there. The Mesa bug is here: https://bugs.freedesktop.org/show_bug.cgi?id=104949
Mesa devs say "[WebKit] seems to be doing the most common and silly mistakes - uses the function pointers w/o checking for the extension string" in the upstream bug. We need to make sure we get this right everywhere, not just WaylandCompositor.cpp.
Created attachment 333283 [details] Patch
(In reply to Michael Catanzaro from comment #1) > Mesa devs say "[WebKit] seems to be doing the most common and silly mistakes > - uses the function pointers w/o checking for the extension string" in the > upstream bug. We need to make sure we get this right everywhere, not just > WaylandCompositor.cpp. I've fixed WaylandCompositor.cpp. The rest of the places calling eglGetProcAddress seem to be properly checking for the required extensions.
Comment on attachment 333283 [details] Patch Thanks
Don't think my r+ etc counts here, but LGTM anyway!
Comment on attachment 333283 [details] Patch Clearing flags on attachment: 333283 Committed r228272: <https://trac.webkit.org/changeset/228272>
All reviewed patches have been landed. Closing bug.
*** Bug 183289 has been marked as a duplicate of this bug. ***