[Mesa-dev] [PATCH] egl/wayland: Make wayland_drm_init declaration match the implementation

Emil Velikov emil.l.velikov at gmail.com
Wed Sep 27 13:56:26 UTC 2017


On 26 September 2017 at 21:51, Daniel Stone <daniel at fooishbar.org> wrote:
> Hi,
>
> On 20 September 2017 at 19:02, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> Krzysztof Sobiecki (sobkas) provided a more elaborate fix on IRC,
>> which I've applied ~15 minutes before this patch went out.
>>
>> Sorry about breaking things :-(
>
> Even with the compile fix, this made Wayland compositors instantly die
> when an accelerated client connected. I've pushed this revert:
>
> commit 5b7e65136440f60a6afe85c9517f42861ee07224 (fdo/master)
> Author: Daniel Stone <daniels at collabora.com>
> Date:   Fri Sep 22 15:40:59 2017 -0700
>
>     Revert "wayland-drm: constify the callbacks struct"
>
>     The wayland-drm callback struct is referenced, rather than duplicated,
>     inside wayland-drm. Constifying this struct involved moving it on to the
>     stack; as a result, starting any EGL client on Wayland called into
>     random stack memory, and killed the compositor.
>
>     This reverts commit 1d0be5b3fe548ee33d4520092f583c76d42510a6 and
>     39d539e321c6c97433a15660c9d9a20ad8657ff0.
>
Thanks Dan and pardon for the mess.

I think we'd want to change wl_drm to have a copy of the callbacks.
As-is one could get a crash racing dlclose of libEGL (or friends)
while any of the callbacks are still used.

I'm assuming that's one of the reasons we have the
wl_drm::wl_buffer_interface instance.

-Emil


More information about the mesa-dev mailing list