-
Notifications
You must be signed in to change notification settings - Fork 80
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
modules that rotate a u128 fail at load time #193
Comments
I don't see how this could be anything but a rustc codegen / wasm intrinsics bug, but I haven't been able to reproduce it without building with cargo-web. |
Definitely looks like a codegen bug. A simpler repro: #![no_std]
#![feature(start)]
#[panic_handler]
fn panic(info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[start]
fn main(_: isize, _: *const *const u8) -> isize {
1u128.rotate_right(1);
0
} This produces the following (in debug mode):
and fails validation:
It reproduces easily without |
Great. Kicking this further up the toolchain: rust-lang/rust#61521 |
FYI, upstream issue has been rejected as @alexcrichton doesn't think it looks like a Rust or LLVM bug. All I know is it's not my bug; I no longer rotate u128s in portable crates. |
src/main.rs:
cargo web test --target=wasm32-unknown-unknown:
Other u128 ops besides rotate_left/right are fine.
If I just
cargo build --target=wasm32-unknown-unknown
(without cargo-web), I get a WASM module that I can import without error.The text was updated successfully, but these errors were encountered: