You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
io_uring_cpp::IoUringSQE::SetData(const T &data) allows caller to pass any properly sized and trivially constructible type to be copied to the user data portion of an IO_URING SQE.
Actual Behavior
Potentially leads to UB where T is <= 8 bytes but T's alignment is more than alignment of uint64_t / 8 bytes.
The issue would be compiler and possibly process dependent.
Expected Behavior
io_uring_cpp::IoUringSQE::SetData(const T &data) allows caller to pass any properly sized and trivially constructible type to be copied to the user data portion of an IO_URING SQE.
Actual Behavior
Potentially leads to UB where T is <= 8 bytes but T's alignment is more than alignment of uint64_t / 8 bytes.
The issue would be compiler and possibly process dependent.
Steps to Reproduce the Problem
1.Code leading to potential UB:
Specifications
Potential Fix:
Add this static assert to SetData(const T &data) in file ./include/IoUringSQE.h:
The text was updated successfully, but these errors were encountered: