devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7a078ba99bd911c766462f005fccc28997541331
commit 7a078ba99bd911c766462f005fccc28997541331 Author: Boram Park <boram1288.p...@samsung.com> Date: Tue May 12 14:43:00 2015 -0400 e_comp_wl: fix segfault in case parent's surface is destroyed before subsurface is destroyed Summary: A parent surface can be destroyed. In this case, ec->comp_data->sub.data->parent has a wrong address which has already destroyed. Then, it occurs segmentation fault. To avoid segfault, ec->comp_data->sub.data->parent should be NULL when a parent surface is destroyed. Signed-off-by: Boram Park <boram1288.p...@samsung.com> Test Plan: Run attached test program(subsurface) Reviewers: gwanglim, cedric, devilhorns, zmike Reviewed By: devilhorns, zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2484 --- src/bin/e_comp_wl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 84236f3..6004b72 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2027,6 +2027,7 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) { /* Eina_Rectangle *dmg; */ struct wl_resource *cb; + E_Client *subc; /* make sure this is a wayland client */ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return; @@ -2041,6 +2042,10 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) e_pixmap_parent_window_set(ec->pixmap, 0); } + /* remove sub list */ + EINA_LIST_FREE(ec->comp_data->sub.list, subc) + subc->comp_data->sub.data->parent = NULL; + if ((ec->parent) && (ec->parent->modal == ec)) { ec->parent->lock_close = EINA_FALSE; --