2012/2/2 Carsten Haitzler <ras...@rasterman.com>:
> On Wed, 01 Feb 2012 03:06:01 +0000 (GMT) Jeong-Hyun Yun
> <jh0506....@samsung.com> said:
>
>> Dear All.
>>
>> I removed potential risk in ecore_ipc_shutdown.
>>
>> If servers can't eina_list removed in ecore_ipc_server_del(),
>> for example, delete_me is true or event_count  == 0 or etc.,
>> then the while loop will be infinite.
>>
>> I modified EINA_LIST_FOREACH instead of while loop.
>>
>> Please review this patch.
>
> this is dangerous. very. take a look at this line in ecore_ipc_server_del():
>
>        servers = eina_list_remove(servers, svr);
>
> so what happens when as you walk a list.. you remove the exact item you are
> walking... then you try use the list node ->next member.. that you just
> freed? :)
>
> this is not a fix. it's asking for segv's.
>
> you issue is this:
>
>   if (svr->event_count == 0)
>
>
> ie it wont remove until events have been spooled out from the server. this 
> wont
> happen until the mainloop goes and runs again, so you have a problem. what i'd
> do is have a routine before u server_del that finds all events for that server
> and deletes them. :) the problem is that there isn't a list of these per
> server. all the events point back to this server so u basically have a
> referencing issue. if a ref that wont be removed until mainlooop flushes the
> events. you want to look over there.
>

I see the first mail says this is a potential issue, so maybe
it's perfectly fine as it stands. Has anyone had any problem with this?

> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    ras...@rasterman.com
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to