Repository navigation
Conversation
Collaborator
|
Some changes occurred in a NetBSD-like module cc @semarie |
This comment has been minimized.
This comment has been minimized.
NetBSD/aarch64 defines __ALIGNBYTES as sizeof(__int128_t) - 1 (sys/arch/arm/include/cdefs.h, __ARM_PCS_AAPCS64 branch), not sizeof(int) - 1. The wrong value makes CMSG_DATA, CMSG_LEN, CMSG_SPACE and CMSG_NXTHDR disagree with the C macros; CMSG_NXTHDR lands in padding, reads cmsg_len 0 and loops forever. Fixes rust-lang#5723 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SW4KMjbF2VxYT6SUrquwYz
ci4ic4
force-pushed
the
netbsd-aarch64-alignbytes
branch
from
November 7, 2026 12:15
bd92588 to
053a86e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On NetBSD/aarch64,
__ALIGNBYTESissizeof(__int128_t) - 1(15) because of the AAPCS64 branch insys/arch/arm/include/cdefs.h. libc currently usessize_of::<c_int>() - 1(3), so allCMSG_*helpers disagree with C. On NetBSD 11.99.10 evbarm:CMSG_DATAoffsetCMSG_LEN(4)CMSG_SPACE(4)With the old value,
CMSG_NXTHDRreturns a zeroed header, and quinn-udp and noq-udp loop on it forever (100% CPU on the first received datagram).Fixes #5723
Sources
__CMSG_ALIGN,CMSG_NXTHDR)Checklist
libc-test/semverhave been updated (n/a: crate-private constant)*LASTor*MAXare included@rustbot label +stable-nominated
🤖 Generated with Claude Code
https://claude.ai/code/session_01SW4KMjbF2VxYT6SUrquwYz