No problem, I guess :) But I think you should post your patch without the off-by-one bug on the libevent's bugtracker on Sourceforge.
-- Victor Goya On Wed, May 6, 2009 at 1:21 PM, <sprin...@cs.wisc.edu> wrote: > My Apologies, > > The first bug was fixed by Victor Goya in r1124. I think my second concern > remains valid. > > Sorry for any confusion, > Kevin Springborn > >> >> Hello, >> >> Running my program inside of valgrind I noticed two problems in version >> 1.4.9 (problems look to still be there in trunk). I've attached a Problem1 >> patch for version 1.4.9. Sorry I don't have time right now to solve >> Problem2. >> >> Problem1: >> Line 268 in epoll.c looks to see if the file descriptor array needs to be >> extended, but passes in the wrong argument. 'fd' is passed into >> epoll_recalc as the size to expand to, but since the array is zero indexed >> it needs to be expanded to 'fd+1' if you intend to access element 'fd' >> (which line 273 does). >> >> Solution: >> pass 'fd+1' into epoll_recalc. >> >> >> Problem2: >> Resizing the fd array potentially moves the array, invalidating any >> existing pointers into the array. Especially user data pointers set with >> epoll_ctl at epoll.c:292. The reallocating functionality needs to update >> all existing pointers if the array moved. >> >> Thanks, >> Kevin Springborn_______________________________________________ >> Libevent-users mailing list >> Libevent-users@monkey.org >> http://monkeymail.org/mailman/listinfo/libevent-users >> > > > _______________________________________________ > Libevent-users mailing list > Libevent-users@monkey.org > http://monkeymail.org/mailman/listinfo/libevent-users > _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users