On Thu, Oct 18, 2012 at 6:13 PM, Mark Heily <
ma...@heily.com> wrote:
>
> What branch or version of libkqueue are you using? The trunk has some
> problems, hopefully you are not using the trunk :)
Yes, it's on the trunk - this functionality doesn't exist in 1.0.6.
>
> Do you have a small testcase that can reliably reproduce the crash?
I don't, since I'm using libkqueue indirectly as a user of libdispatch
and don't have a good understanding of how libdispatch is using
libkqueue.
I would guess that spawning a fresh thread that creates a kqueue,
triggers an event on it somehow, and then waits on the event with a
timeout of <1ms should trigger the problem.
The call to linux_kevent_wait() will call into
linux_kevent_wait_hires(), which will return that an event is
available, and then linux_kevent_copyout() will access epevt, which
will be created fresh since that's the first access to it from this
new thread, and linux_kevent_copyout() will crash in the call to
knote_lock(), since epevt[0].data.ptr is NULL.
Paul