aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-07-19 15:25:46 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-07-19 15:44:49 +0900
commit7231a3295bc2d6238d2e95999be7f642d4b6730a (patch)
tree4c1a6fb043fdf668daf913113c26c6bc113729f5 /src/lib/eo
parentevas: Fix cmopilation warning (diff)
downloadefl-7231a3295bc2d6238d2e95999be7f642d4b6730a.tar.gz
eo: Fix deadlock due to the shared mutex
Explicit lock / unlock of the shared mutex mixed with implicit lock / unlock when accessing the internal Eo_Object data lead to uncaught issues such as these. This was found by trying to run E with gfx filters under eo_debug.
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/eo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 2345fd3196..5af21f5f74 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1695,12 +1695,14 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id)
// Currently implemented by reusing the LAST op id. Just marking it with
// _eo_class_isa_func.
isa = tdata->cache.isa = (func && (func->func == _eo_class_isa_func));
+ EO_OBJ_DONE(eo_id);
eina_lock_release(&(_eo_table_data_shared_data->obj_lock));
}
return isa;
err_shared_class:
_EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id);
+ EO_OBJ_DONE(eo_id);
err_shared_obj:
eina_lock_release(&(_eo_table_data_shared_data->obj_lock));
return EINA_FALSE;