[PATCH 1/1] libweston: add weston_view_set_output()

Pekka Paalanen ppaalanen at gmail.com
Fri May 18 10:51:47 UTC 2018


On Thu, 26 Apr 2018 11:08:10 +0200
Fabien Lahoudere <fabien.lahoudere at collabora.com> wrote:

> From: Semi Malinen <semi.malinen at ge.com>
> 
> Instead of desktop shell assigning view outputs directly,
> use a new method, weston_view_set_output(). The method can
> set up an output destroy listener to make sure that views
> do not have stale output pointers.
> 
> Without this patch it is possible to end up in a scenario
> where, e.g. configure_static_view() accesses memory that
> has already been freed. The scenario can be provoked by
> repeatedly plugging and unplugging a display. The faulty
> memory accesses are reported by valgrind.
> 
> Signed-off-by: Semi Malinen <semi.malinen at ge.com>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere at collabora.com>
> ---
>  desktop-shell/shell.c  | 11 +++++++----
>  libweston/compositor.c | 43 +++++++++++++++++++++++++++++++++++++++++--
>  libweston/compositor.h |  4 ++++
>  3 files changed, 52 insertions(+), 6 deletions(-)

Pushed with my R-b:
   03dc95a1..e7a52fbb  master -> master


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180518/e7ee0fcc/attachment.sig>


More information about the wayland-devel mailing list