Good catch. Patch in svn. Thanks :) Dh
-----Original Message----- From: zhiwen...@linux.intel.com [mailto:zhiwen...@linux.intel.com] Sent: 01 August 2012 15:04 To: enlightenment-devel@lists.sourceforge.net Cc: eduardo.de.barros.l...@intel.com Subject: [E-devel] [PATCH] evas/elementary: Fix hoversel test segfault on wayland engine From: Alex Wu <zhiwen...@linux.intel.com> Bug report at http://trac.enlightenment.org/e/ticket/1235 The hoversel widget has a hover object internally to prompt item list. Once user click at the prompted area, the hover will dispear. Internally, the function stack like this: _on_hover_clicked()--> elm_hoversel_hover_end()-->evas_object_del(sd->hover). After this calling, hover object is marked as "to be deleted". i.e. obj->delete_me=1. In the next evas_render_updates_internal(), it will be freed. For wayland engine, there is an additional clipping operation to make the render_objects clipped into the viewport (See phase 4.5 in evas_render_updates_internal()). The problem is that the hover object marked as "to be deleted" will be clipped into e->framespace.clip by evas_object_clip_set(obj, e->framespace.clip) and then freed. So that the e->framespace.clip hold a wild pointer. At next evas_object_change(e->framespace.clip), Segmentation fault occur. I think this problem is not specific to hoversel. This patch add a check for obj->delete_me to avoid clipping a object which will be freed. --- trunk/evas/src/lib/canvas/evas_render.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/evas/src/lib/canvas/evas_render.c b/trunk/evas/src/lib/canvas/evas_render.c index 1db3d21..0a1f938 100644 --- a/trunk/evas/src/lib/canvas/evas_render.c +++ b/trunk/evas/src/lib/canvas/evas_render.c @@ -1412,6 +1412,8 @@ evas_render_updates_internal(Evas *e, if (evas_object_is_frame_object_get(obj)) continue; + if (obj->delete_me) continue; + EINA_RECTANGLE_SET(&obj_rect, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); -- 1.7.9.5 ---------------------------------------------------------------------------- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel