On Tue, May 19, 2009 at 10:20 PM, Peter Ross <p...@missioncriticalit.com> wrote:
> Hi,
>
> I've been tracking down a bug with boehm gc prematurely collecting the
> bufferevent callback arg value.  This occurs when one is the middle of
> processing another bufferevent in the read callback.
>
> I've tried to grok the code to understand how one would get from the
> eventbase to the other bufferevent, so I can check where the boehm gc
> is losing the pointer, but having difficulty understanding the code.
>
The reason why boehm gc lost the pointer was that the eventbase points
to the interior of the bufferevent and my version of boehm gc wasn't
setup to handle interior pointers.  It assumed all pointers pointed to
the start of an allocated memory block, thus it prematurely collected
the bufferevent.

So the moral of the story, if you are using libevent with boehm gc,
make sure that you turn on interior pointer detection.

Regards,
Pete
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to