romange / helio

A modern framework for backend development based on io_uring Linux interface
Apache License 2.0
447 stars 50 forks source link

fix(io_buf): new/delete alignment missmatch #213

Closed kostasrim closed 9 months ago

kostasrim commented 9 months ago

The problem is that in IoBuf::Reserve method we allocate with:

uint8_t* nb = new (std::align_val_t{alignment_}) uint8_t[sz];

and later

delete[] buf_;

which causes an alignment mismatch