Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io_uring write_some_at writes at wrong offset #389

Open
JoelKatz opened this issue Mar 5, 2022 · 1 comment
Open

io_uring write_some_at writes at wrong offset #389

JoelKatz opened this issue Mar 5, 2022 · 1 comment

Comments

@JoelKatz
Copy link

JoelKatz commented Mar 5, 2022

In io_uring_descriptor_service.hpp we have:

      return descriptor_ops::sync_write_at1(impl.descriptor_,
          offset, impl.state_, bufs_type::first(buffers).data(),
          bufs_type::first(buffers).size(), ec);

But in descriptor_ops.ipp we have:

std::size_t sync_write_at1(int d, state_type state, uint64_t offset,
    const void* data, std::size_t size, boost::system::error_code& ec)

The observed symptom is that writes using write_some_at write to a constant and incorrect offset. Reversing the offset and state parameters in io_uring_descriptor_service.hpp fixes the symptom. I'm not confident that's the correct fix though and this same issue may be present in related code paths.

@mclow mclow transferred this issue from boostorg/boost Mar 5, 2022
@ljhaoge
Copy link

ljhaoge commented Mar 16, 2022

Excuse me (t.radarlab.org) When can I log in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants