On Fri, 03 Feb 2012 22:26:41 +0100 Sebastian Dransfeld <s...@tango.flipp.net> said:
> On 02/02/2012 10:00 AM, Carsten Haitzler (The Rasterman) wrote: > > 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. > > > > EINA_LIST_FOREACH_SAFE() i guess that could work too - though you still have events in a queue... pointing back to a server u now deleted. :/ i guess the qhole issue is one of... is this really valid - should you be able to init again after a shutdown (in the same process) and pick up again with no crashes/problems? -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Try before you buy = See our experts in action! 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-dev2 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel