Skip to content

Commit 15ed5a5

Browse files
committed
Fix misaligned references when using recvmsg with control messages
On some platforms the alignment of cmsg_data could be less than the alignment of the messages that it contains. That led to unaligned reads on those platforms. This change fixes the issue by always copying the message contents into aligned objects. The change is not 100% backwards compatible when using recvmsg. Users may have to replace code like this: ```rust if let ControlMessage::ScmRights(&fds) = cmsg { ``` with this: ```rust if let ControlMessageOwned::ScmRights(fds) = cmsg { ``` Fixes #999
1 parent e0f612d commit 15ed5a5

File tree

3 files changed

+178
-288
lines changed

3 files changed

+178
-288
lines changed

0 commit comments

Comments
 (0)