Skip to content

Commit

Permalink
fix pointer indirection issue in Message
Browse files Browse the repository at this point in the history
were sending pointers, not values, on the wire
  • Loading branch information
lhoward committed Aug 27, 2024
1 parent 39cda2d commit 9acdf07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/IORing/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public final class Message: @unchecked Sendable {
self.address = address
self.buffer = buffer
storage.msg_flags = CInt(flags)
Swift.withUnsafeMutablePointer(to: &self.buffer) {
iov_storage.iov_base = UnsafeMutableRawPointer(mutating: $0)
self.buffer.withUnsafeMutableBytes {
iov_storage.iov_base = UnsafeMutableRawPointer(mutating: $0.baseAddress)
}
iov_storage.iov_len = self.buffer.count
Swift.withUnsafeMutablePointer(to: &self.address) { pointer in
Expand Down

0 comments on commit 9acdf07

Please sign in to comment.