-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE during cross-compilation and const eval #49033
Comments
Needs a workaround until rust-lang/rust#49033 is fixed
OK this is weird. It looks like the metadata contains See https://github.com/rust-lang/rust/blob/master/src/librustc_metadata/decoder.rs#L285 for the decoding and https://github.com/rust-lang/rust/blob/master/src/librustc_metadata/encoder.rs#L217 for the encoding. The target bitwidth should not influence usize serialization to metadata, right? Or is the libstd built on i686 and now read on x86_64? That would mean we should investigate all uses of usize/isize serialization in metadata, because they all may have similar problems. I'll fix it on Friday, until then, anyone can fix this by making 0 and 1 reserved indices instead of usize::max_value and its predecessor |
Or, just use u32 instead of usize, which means that 64 bit hosts can have a maximum of 2^32 allocations that go into metadata. We can then revisit when it becomes an issue because we run out of indices |
Ah no, I misunderstood, there's no metadata file that can be bigger than 4 gigabytes. We should probably forbid encoding usize to metadata with a specialized encoder that panics. Because any metadata file that's bigger than 4GB will cause similar errors to pop up |
triage: P-high |
Removes temporary workaround for rust-lang/rust#49033.
Looks like today's nightly unfortunately contains a regression from #46882 (confirmed locally) which causes rustc to ICE specifically when cross-compiling
cc @oli-obk
The text was updated successfully, but these errors were encountered: