[Mesa-dev] [PATCH] egl/wayland-egl: Fix for segfault in dri2_wl_destroy_surface.

Emil Velikov emil.l.velikov at gmail.com
Tue Aug 23 16:41:34 UTC 2016


On 22 August 2016 at 08:48, Stencel, Joanna <joanna.stencel at intel.com> wrote:
> Segfault occurs when destroying EGL surface attached to already destroyed
> Wayland window. The fix is to set to NULL the pointer of surface's
> native window when wl_egl_destroy_window() is called.
>
Are you sure one is not supposed to call eglDestroySurface() first and
then wl_egl_window_destroy() ? As-is the patch "fixes" a crash (by
creating a leak) caused by user misuse. Should we a) leave the crash
to teach people about bugs in their code, b) plug the crash yet cause
a leak, or c) plus the crash w/o causing a leak.

I'm leaning towards a) or c) since b) only papers over things.
-Emil


More information about the mesa-dev mailing list