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.
This commit is contained in:
Jean-Philippe Andre 2017-07-19 15:25:46 +09:00
parent b98bc51968
commit 7231a3295b
1 changed files with 2 additions and 0 deletions

View File

@ -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;