boostorg / boostorg/asio

io_uring write_some_at writes at wrong offset

Open
#389 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.6k
Forks
485
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.