Re: [Libevent-users] Crash in event_del

2010-08-11 Thread Dan Kegel
On Wed, Aug 11, 2010 at 12:22 PM, William Ahern wrote: >> This code sample does skip the mandatory event_init, but event_del should be >> more cautious nevertheless. > > Why? You'd rather the code do an admittedly needless check millions, > possibly billions of times per process? I suppose when c

Re: [Libevent-users] Crash in event_del

2010-08-11 Thread William Ahern
On Wed, Aug 11, 2010 at 12:00:09PM -0700, Gilad Benjamini wrote: > My code currently runs with libevent 1.4 > While in the process of upgrading to libevent 2.0.6 I got a segfault. > > Code sample is pretty basic > event_set(&ev,fd,EV_READ,fd_handler,NULL) ; > event_del(&ev) ; > > The reason f

[Libevent-users] Crash in event_del

2010-08-11 Thread Gilad Benjamini
My code currently runs with libevent 1.4 While in the process of upgrading to libevent 2.0.6 I got a segfault. Code sample is pretty basic event_set(&ev,fd,EV_READ,fd_handler,NULL) ; event_del(&ev) ; The reason for the crash is pretty simple as well. event_del calls EVBASE_ACQUIRE_LOCK which