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

Daniel Stone daniel at fooishbar.org
Wed Sep 27 14:26:27 UTC 2017


Hi,

On 27 September 2017 at 14:56, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 26 September 2017 at 21:51, Daniel Stone <daniel at fooishbar.org> wrote:
>>     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.
>
> 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.

Sure, and it's also broken with doing BindWaylandDisplay multiple
times, I'd imagine. I'd happily review & test a patch which copies the
struct, as that seems like the right thing to do, but a revert was
quickest/easiest for now.

Cheers,
Daniel


More information about the mesa-dev mailing list