-
Notifications
You must be signed in to change notification settings - Fork 13.3k
We shouldn't use the host's uint
for target sizes.
#5172
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
Comments
Can you point out examples where this is happening? Just curious which instances you're referring to. |
All the |
I don't think this is backwards incompatible. |
I think this is backwards incompatible. The size of |
I don't think it has to do with the size of |
just a bug, removing milestone/nomination. |
This should be fairly easy to do. Just change |
Is this still wanted? I can tackle this if so. I presume we want to make align_of and element_offset stuff in trans::machine also return u64's instead of uint's? |
…ad of uint in trans::machine (per rust-lang#5172)
…ad of uint in trans::machine (per rust-lang#5172)
…ad of uint in trans::machine (per rust-lang#5172)
Closed by #11759, thanks @nathanielherman! |
Found more issues: // middle::trans::common:
pub fn C_int(ccx: &CrateContext, i: int) -> ValueRef {...}
pub fn C_uint(ccx: &CrateContext, i: uint) -> ValueRef {...} These look like they would truncate values when cross-compiling from a 32-bit architecture to a 64-bit one. |
The code in question that @eddyb mentioned |
The code in question now uses AsU64 and AsI64. |
There's been a lot of ongoing work to move away from |
Improve deployment and documentation **This should be merged shortly after** rust-lang#5172 This extracts the python code that generated the `versions.json` file and now sorts the versions. in addition to that it improves the order on the website, respecting the new `rust-*` directories. The new appearance of the documentation site can be previewed here: https://flip1995.github.io/rust-clippy/ changelog: Add documentation for Clippy stable releases at https://rust-lang.github.io/rust-clippy/
It's unclear how likely we are to ever deal with ≥4GiB things (or possible things; e.g., if an mmapped region is cast to a huge fixed array type or something like that), let alone when cross-compiling from 32-bit to 64-bit, but this is probably something that should be cleaned up.
For comparison, LLVM seems to mostly use
uint64_t
for sizes; there are a fewunsigned
s but I think they may all be for cases like individual machine-level values where the sizes can't overflow.The text was updated successfully, but these errors were encountered: