-
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
Integer overflow compiling libcore with RUST_LOG=rustc::middle::dataflow #24412
Comments
Can't reproduce with
|
Are you sure you used a build with active logging? You need to configure it with |
Sorry, good hint. I CAN reproduce the ICE. |
oh cool, this seems like it must be a bug either in the overflow-detection or in the dataflow code |
It seems as if the dataflow code is flawed, trying to shift a usize var by values >32bits. Shouldn't the and'ed mask be dataflow.rs:660
|
yeah, that's definitely a bug; if the code (that this is providing instrumentation for) is extracting a byte and then a bit from within it, then
If its extracting a 32-bit word and then a bit within that, then
(if the extraction really is word-size dependent, that seems like a recipe for trouble to me... better to just use |
@nikomatsakis says it's fixed. |
fn bit_str(bit: usize) -> String {
let byte = bit >> 3;
let lobits = 1 << (bit & 0b111); // <-- NB: b111
format!("[{}:{}-{:02x}]", bit, byte, lobits)
} |
Gives this ICE
The text was updated successfully, but these errors were encountered: