-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
reproducable wasm32 bug #85580
Comments
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
Smells like an LLVM miscompilation issue? Since it is target-specific, a MIR issue seems unlikely. Cc @rust-lang/wg-llvm |
Error: This team ( Please let |
Error: This team ( Please let |
With
Note that |
Upstream issue: https://bugs.llvm.org/show_bug.cgi?id=51651 |
I'm really sorry if this isn't a compiler bug, but it smells like one. I've managed to bag it into a few lines of code. Change or reorder anything and the test will pass.
If you run
cargo test
this repo it will pass:https:/gilescope/wasm-repro1.git
If you add in
--target=wasm32-unknown-unknown
it will fail. ( You will need tocargo install wasm-bindgen-cli
)It seems to correctly figure out that the condion is false but then take the true branch of the if anyway. There's no unsafe in the code so there should be no UB....
Why for instance does
<< 0
have to be there for the bug to manifest itself? I am clueless...This is with the latest nightly ( rustc 1.54.0-nightly (5dc8789 2021-05-21) ), but have confirmed it fails on beta too.
I would love to know what is going on - it seems very wierd behaviour.
The text was updated successfully, but these errors were encountered: