-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reduce maximum repr(align(N)) to 2^29 #50378
Conversation
r? @rkruppe (I think something's wrong with @rust-highfive :( ) |
/// with a maximum capacity of 2<sup>31</sup> - 1 or 2147483647. | ||
/// Each field is a power of two, giving the alignment a maximum value | ||
/// of 2<sup>(2<sup>8</sup> - 1)</sup>, which is limited by LLVM to a | ||
/// maximum capacity of 2<sup>29</sup> or 536870912. |
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.
I'm pretty sure Align::from_bytes
needs to be updated to reflect this.
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.
Ah, of course!
This brings it into line with LLVM's maximum permitted alignment.
cc @eddyb |
@bors r+ |
📌 Commit cd2f5f7 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
The current maximum
repr(align(N))
alignment is larger than the maximum alignment accepted by LLVM, which can cause issues for huge values ofN
, as seen in #49492. Fixes #49492.r? @rkruppe