It was using memcpy to strip out the events in the middle of event_buffer and result_buffer, but since it was moving overlapping src and dests this caused... undefined behavior leading to crashes. swapped out to memmove as per memcpy(3) man page and now the more complex add and remove test passes.
This appears to completely fix #70 .
It was using memcpy to strip out the events in the middle of event_buffer and result_buffer, but since it was moving overlapping src and dests this caused... undefined behavior leading to crashes. swapped out to memmove as per memcpy(3) man page and now the more complex add and remove test passes.