-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix _CMSG_ALIGN on DragonFly #2610
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is not a libc bug. Rather, it's an ABI change in Dragonfly. libc's code was correct at the time it was written. Presumably this PR will break Nix's SCM tests for older Dragonfly versions. I don't see any CHANGELOG file for libc. Is there a different way to announce a change of the minimum supported OS version ?
In the past I've been told to mark items impacted by ABI changes as deprecated, and then waiting a few libc releases before submitting the change. In theory this notifies everyone uptaking new libc versions at a periodic cadence. My reluctance to do so here is motivated by my experience doing so for a previous DragonFly ABI change:
IMHO, given current interest/investment levels towards rust on DragonFly, the best strategy is for libc to always target the latest in-development version of DragonFly (perhaps stabilizing briefly around DragonFly release windows). This helps guarantee that each DragonFly release is reasonably supported by at least one version of libc, date-aligned. If needed, users could force other crates to use this version of libc and cherry-pick additional changes on top of it. I'm not sure there's sufficient interest to maintain support for multiple versions like FreeBSD, and having a "live at head" policy seems more internally consistent than the ABI-version-mystery-meat that exists today. It's certainly imperfect, but I'd wager most people uptaking new versions of rust on DragonFly are also uptaking new versions of DragonFly, and vice-versa. |
I agree that |
98c4c15
to
67464ff
Compare
I'm happy to go with this for now (unless someone comes along and complains). @bors r+ |
📌 Commit 67464ff has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
Fix _CMSG_ALIGN on DragonFly The attempted fix in #2610 originally had `7` hard coded, but it was suggested I replace this with a size_of call. Unfortunately the suggestion omitted a subtraction from the size_of call, and I didn't catch it. Tested by running the failing `nix` tests on DragonFly (and didn't change the code again after running the tests).
Based on the following DragonFly source:
This fixes nix's failing scm tests on DragonFly.