On Mon, Aug 13, 2012 at 12:32 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > patch from vtorri fixing rare segv condition in main loop
actually, it always seg fault on windows since revision 59823 (ecore_pipe.c improvement) and another one which call an ecore_pipe function in ecore_init (iirc) Vincent > > > Author: discomfitor > Date: 2012-08-13 03:32:20 -0700 (Mon, 13 Aug 2012) > New Revision: 75206 > Trac: http://trac.enlightenment.org/e/changeset/75206 > > Modified: > trunk/ecore/ChangeLog trunk/ecore/NEWS > trunk/ecore/src/lib/ecore/ecore_main.c > > Modified: trunk/ecore/ChangeLog > =================================================================== > --- trunk/ecore/ChangeLog 2012-08-13 10:26:41 UTC (rev 75205) > +++ trunk/ecore/ChangeLog 2012-08-13 10:32:20 UTC (rev 75206) > @@ -858,3 +858,6 @@ > * Fix ecore fork reset function to allow for callbacks to be > attached so ecore-evas can reset evas async fd on fork. > > +2012-08-13 Vincent Torri > + > + * Fix segmentation fault when fd_set pointers are NULL on Windows > > Modified: trunk/ecore/NEWS > =================================================================== > --- trunk/ecore/NEWS 2012-08-13 10:26:41 UTC (rev 75205) > +++ trunk/ecore/NEWS 2012-08-13 10:32:20 UTC (rev 75206) > @@ -29,6 +29,7 @@ > - Force cancel of all running Ecore_Thread on shutdown. > - Make Ecore_Thread work reliably when called without a running main > loop. > - Correctly shutdown Ecore_Thread. > + - Fix usage of FD_SET and al. when fd_set pointers are NULL (Windows) > > * ecore_x > - Fix unitialized Ecore_X_Atom use. > > Modified: trunk/ecore/src/lib/ecore/ecore_main.c > =================================================================== > --- trunk/ecore/src/lib/ecore/ecore_main.c 2012-08-13 10:26:41 UTC (rev > 75205) > +++ trunk/ecore/src/lib/ecore/ecore_main.c 2012-08-13 10:32:20 UTC (rev > 75206) > @@ -1941,12 +1941,21 @@ > long network_event; > > network_event = 0; > - if (FD_ISSET(fdh->fd, readfds)) > - network_event |= FD_READ; > - if (FD_ISSET(fdh->fd, writefds)) > - network_event |= FD_WRITE; > - if (FD_ISSET(fdh->fd, exceptfds)) > - network_event |= FD_OOB; > + if (readfds) > + { > + if (FD_ISSET(fdh->fd, readfds)) > + network_event |= FD_READ; > + } > + if (writefds) > + { > + if (FD_ISSET(fdh->fd, writefds)) > + network_event |= FD_WRITE; > + } > + if (exceptfds) > + { > + if (FD_ISSET(fdh->fd, exceptfds)) > + network_event |= FD_OOB; > + } > > if (network_event) > { > @@ -1986,9 +1995,12 @@ > result = MsgWaitForMultipleObjects(objects_nbr, (const HANDLE *)objects, > EINA_FALSE, > timeout, QS_ALLINPUT); > > - FD_ZERO(readfds); > - FD_ZERO(writefds); > - FD_ZERO(exceptfds); > + if (readfds) > + FD_ZERO(readfds); > + if (writefds) > + FD_ZERO(writefds); > + if (exceptfds) > + FD_ZERO(exceptfds); > > /* The result tells us the type of event we have. */ > if (result == WAIT_FAILED) > @@ -2021,11 +2033,11 @@ > > WSAEnumNetworkEvents(sockets[result], objects[result], > &network_event); > > - if (network_event.lNetworkEvents & FD_READ) > + if ((network_event.lNetworkEvents & FD_READ) && readfds) > FD_SET(sockets[result], readfds); > - if (network_event.lNetworkEvents & FD_WRITE) > + if ((network_event.lNetworkEvents & FD_WRITE) && writefds) > FD_SET(sockets[result], writefds); > - if (network_event.lNetworkEvents & FD_OOB) > + if ((network_event.lNetworkEvents & FD_OOB) && exceptfds) > FD_SET(sockets[result], exceptfds); > > res = 1; > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel