Skip to content

egl: Fix _eglPointerIsDereferencable on systems w/o mincore()

On platforms without mincore(), _eglPointerIsDereferencable(void *p) currently just checks whether p != NULL. This is not sufficient: In the Wayland platform code (i.e., in get_wl_surface_proxy()), _eglPointerIsDereferencable() is called on the version field of struct wl_egl_window which is 3 on current versions of Wayland. This causes a segfault when trying to dereference p.

Fix this behavior by assuming that the first page of the process is never dereferencable.

Merge request reports