Summary: During mobile product testing, we got a crash with callstack which suggest server is getting deleted prior to client. On valgrind analysis we found invalid write operation with same callstack. callstack is pasted in comment section.
Test Plan: create a situation where server got deleted prior to client.
Reviewers: raster, cedric
Subscribers: govi, rajeshps, jpeg
Differential Revision: https://phab.enlightenment.org/D4152
Ecore_Ipc_Client *cl;
EINA_LIST_FREE(svr->clients, cl)
- ecore_ipc_client_del(cl);
+ {
+ cl->svr = NULL;
+ ecore_ipc_client_del(cl);
+ }
if (svr->server) ecore_con_server_del(svr->server);
servers = eina_list_remove(servers, svr);
{
svr = cl->svr;
if (cl->client) ecore_con_client_del(cl->client);
- svr->clients = eina_list_remove(svr->clients, cl);
+ if (ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
+ svr->clients = eina_list_remove(svr->clients, cl);
if (cl->buf) free(cl->buf);
ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
free(cl);