[PATCH] compositor: Clean up view output move and destroy listeners

Eoff, Ullysses A ullysses.a.eoff at intel.com
Thu Dec 19 15:01:36 PST 2013


This patch appears to stabilize the issue reported at 
https://bugs.freedesktop.org/show_bug.cgi?id=72845

I could not get Weston to crash in 20+ attempts to
replicate.

U. Artie Eoff

> -----Original Message-----
> From: wayland-devel-bounces at lists.freedesktop.org [mailto:wayland-devel-bounces at lists.freedesktop.org] On Behalf Of Ander
> Conselvan de Oliveira
> Sent: Thursday, December 19, 2013 8:34 AM
> To: wayland-devel at lists.freedesktop.org
> Cc: Conselvan De Oliveira, Ander
> Subject: [PATCH] compositor: Clean up view output move and destroy listeners
> 
> From: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> 
> Remove those listeners when the output is destroyed, otherwise they'll
> point to invalid data that may lead to corruption when assigning a new
> output for the view.
> 
> --
> This is possibly related to bug 72845. I didn't have enough equipment
> to try and reproduce it.
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=72845
> ---
>  src/compositor.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 6ca297a..ff0f3ab 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -413,6 +413,12 @@ weston_view_output_destroy_handler(struct wl_listener *listener,
> 
>  	if (ev->surface->output_destroyed)
>  		ev->surface->output_destroyed(ev->surface);
> +
> +	wl_list_remove(&ev->output_move_listener.link);
> +	wl_list_remove(&ev->output_destroy_listener.link);
> +
> +	wl_list_init(&ev->output_move_listener.link);
> +	wl_list_init(&ev->output_destroy_listener.link);
>  }
> 
>  WL_EXPORT struct weston_view *
> --
> 1.7.9.5
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list