Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upwrong code regression: HashSet initialization #42918
Comments
Mark-Simulacrum
added
O-android
O-ARM
regression-from-stable-to-nightly
T-compiler
and removed
O-android
O-ARM
labels
Jun 26, 2017
nagisa
added
A-codegen
I-wrong
regression-from-stable-to-beta
and removed
regression-from-stable-to-nightly
labels
Jun 27, 2017
nikomatsakis
added
the
I-nominated
label
Jul 7, 2017
This comment has been minimized.
This comment has been minimized.
|
Nominating. cc @rust-lang/compiler -- anybody have any ideas what's going on with this ARM codegen regression? |
This comment has been minimized.
This comment has been minimized.
|
So we've updated to LLVM 4.0.1 since then (#42930) -- I suspect that may well have fixed this problem. Perhaps @Dushistov could check on a recent nightly? In case the problem isn't quite fixed, cc @arielb1 |
This comment has been minimized.
This comment has been minimized.
Yes, with rustc At now only |
This comment has been minimized.
This comment has been minimized.
|
I believe that the fix is backported, just we haven't released a new beta yet. |
This comment has been minimized.
This comment has been minimized.
|
It looks to me like the llvm patch has not been backported yet. I will do so today. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@Mark-Simulacrum hm so it is. it is tagged incorrectly. |
This comment has been minimized.
This comment has been minimized.
|
beta.3 is out with the LLVM backport. Can anyone confirm a fix? |
This comment has been minimized.
This comment has been minimized.
|
@brson |
brson
added
the
E-needstest
label
Jul 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for confirming @Dushistov. I don't offhand know how to reduce the test case though. Sorry! |
Mark-Simulacrum
removed
I-nominated
regression-from-stable-to-beta
labels
Jul 13, 2017
Mark-Simulacrum
added
C-bug
and removed
I-wrong
labels
Jul 28, 2017
This comment has been minimized.
This comment has been minimized.
|
I was able to reduce the test to this code: use std::collections::HashSet;
#[derive(PartialEq, Debug, Hash, Eq, Clone)]
enum MyEnum {
E0,
E1,
E2,
E3,
E4,
E5,
E6,
E7,
}
fn main() {
let s: HashSet<_> = [MyEnum::E4, MyEnum::E1].iter().cloned().collect();
println!("Expect only E1+E4 got {:?}", s);
}it prints
on buggy compier |
Dushistov commentedJun 26, 2017
•
edited
Idea of bug is simple:
On stable today compiler
rustc 1.18.0 (03fc9d622 2017-06-06)it print as expected{RMC, GGA}, but if use beta/nightly it prints all variants fromSentenceType.Note: that the code above is just sketch, to realy reproduce problem you need android/arm cpu (may be works with other/arm, but I not able to check right now),
and two crates, in attachment crate that reproduce problem,
to run it you may use such commands:
adb shell mkdir /data/sample cargo build --target=arm-linux-androideabi --release adb push target/arm-linux-androideabi/release/hashset_bug /data/sample/ adb shell 'RUST_LOG=debug /data/sample/hashset_bug'With stable it produces such output:
with beta/nightly it prodcues such output:
hashset_bug.zip