-
Notifications
You must be signed in to change notification settings - Fork 182
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
Enforce C,packed, not just packed, on ULE types #5049
Conversation
a8d1b15
to
700b545
Compare
Given that this breaks data, I would suggest we release:
|
Since these are ULE types, do we need the repr at all? Or maybe just repr C? I recall this causing compiler issues multiple times. |
No, we absolutely need packed for safety, that is a strong safety requirement. Otherwise we make padding bytes readable. |
We have already fixed the compiler issues. |
Under what conditions would padding bytes be inserted, given that all of the types are align 1? |
What I mean is, a better assertion might be |
It's unclear, there's some iffy behavior around generics and types C does not natively support, and I would rather be safe than sorry here. We want it to be packed, so let's say we want it to be packed. There's very little weird compiler behavior here, I do not consider it a major risk. None of it is prohibitive in nature. we could add autogenerated assertions if we like, however I am not in favor of replacing the packed directive with something with something else |
I didn't double check that you touched all places you were supposed to touch. I can do that if you think it's important. |
I think it's fine, yeah! We should figure out backports next week. |
needs-approval for backport plan, seeking input on what backports to do |
Yes on rereleasing things in the 1.5 branch of course. For the older versions, I remember we decided to support Rust versions N-6 to N-4 into the past. Did we decide how far to support into the future? |
I don't recall, but given that it's an easy backport I figured there's no harm in doing it anyway if someone (me) is happy to put in the effort. |
Fixes unicode-org#5039 Caused by rust-lang/rust#125360. We were assuming that `packed` meant `C, packed` already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.
Fixes unicode-org#5039 Caused by rust-lang/rust#125360. We were assuming that `packed` meant `C, packed` already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.
Fixes unicode-org#5039 Caused by rust-lang/rust#125360. We were assuming that `packed` meant `C, packed` already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.
Fixes unicode-org#5039 Caused by rust-lang/rust#125360. We were assuming that `packed` meant `C, packed` already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.
Fixes unicode-org#5039 Caused by rust-lang/rust#125360. We were assuming that `packed` meant `C, packed` already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.
Uplifts #5049 to zerovec 0.9.7
Uplifts #5049 to 1.4.x Not strictly necessary as per policy, but might be nice to do anyway?
Notes from 2024-06-20
Conclusion:
LGTM: @Manishearth @robertbastian @sffc |
Oh, I forgot to yank |
done |
Fixes #5039
Caused by rust-lang/rust#125360. We were assuming that
packed
meantC, packed
already. This is an assumption I've seen throughout the Rust ecosystem so there may be reasons to revert.