ringbahn / iou

Rust interface to io_uring
Apache License 2.0
328 stars 22 forks source link

fix prepare_sqes #66

Open glommer opened 3 years ago

glommer commented 3 years ago

This method takes a slice from the sqe queue, but that is completely wrong: the sqe queue is a circular buffer, so if you try to get 2 elements at position n - 1 you access invalid memory.

This patch transforms the very helpful SQEs structure so that it now only has the information needed to access each SQE and constructs them from there.