On 16 Sep 2016 10:31 am, "sahil aggarwal" <sahil.agg15@xxxxxxxxx> wrote:
>
> Was able to reproduce by running the program in GDB and adding the
> breakpoints at event.c:2476 and continuing from there.
>
> So the heap has same event at multiple positions which can cause the
> event in heap to have min_heap_idx = -1. Here is the current heap
Hi, thanks for details and reproducer, will take a look ASAP.
Did you tried running under valgrind? (Though it can be but not so useful for event driven. I wrote simple sanitizer for clang [1] to check event_add/event_del/... I can try to adopt it to find such things maybe. Plus I don't remember did I finished it or not (Sigh)).
[1] https://github.com/azat/clang/commits/sa-libevent-checker-v2