[PATCH xserver v2] xwayland: avoid using freed xwl_window on unrealize

Daniel Stone daniel at fooishbar.org
Thu Apr 19 15:24:16 UTC 2018


Hi,

On 19 April 2018 at 16:05, Olivier Fourdan <ofourdan at redhat.com> wrote:
> (gdb) f 9
> #9  xwl_present_frame_callback (data=0x184cb10, callback=<optimized out>,
> time=<optimized out>) at xwayland-present.c:192
> 192        wl_callback_destroy(xwl_window->present_frame_callback);
> (gdb) list
> 187                   struct wl_callback *callback,
> 188                   uint32_t time)
> 189    {
> 190        struct xwl_window *xwl_window = data;
> 191
> 192        wl_callback_destroy(xwl_window->present_frame_callback);
> 193        xwl_window->present_frame_callback = NULL;
> 194
> 195        if (xwl_window->present_timer_firing) {
> 196            /* If the timer is firing, this frame callback is too late */
>
> Looks like we're not done yet :/
>
> I'll try that other patch I sent and see if that makes a difference here,
> could be related according to the backtrace I guess...

The callback is passed as an argument to the function directly, so you
could just destroy that instead.

Cheers,
Daniel


More information about the xorg-devel mailing list