> +populate: > + count = raio->len - offsetof(struct aio_ring, io_events); > + builtin_memcpy((void *)ctx, ring, count); Ring header is at the beginning of the ring, and we don't want to overwrite it with memcpy, so shouldn't this be rather memcpy(ctx + offsetof(), rin + offsetof, count) ?