You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current nightly builds (1.24.0-nightly (73bca2b 2017-11-28)), some (I assume most) programs are unrunnable on wasm32-unknown-unknown (tested in Firefox 56.0) unless compiled with optimization flags. The condition appears somewhere between where the start function and main is called in this example, but I've also tested overriding the start function to a no-op, and then the most simple functions (just returning an integer) worked, but anything that called another function didn't.
Steps to reproduce:
#[no_mangle]pubextern"C"fnpub_function(x:i32) -> i32{2* x }pubfnmain(){}
as demo.rs; compile with rustc +nightly --target wasm32-unknown-unknown -O demo.rs and serve together with this index.html:
… and the console will print 84. Leave out the -O, and instead, the console will give RuntimeError: index out of bounds, with a stack trace 7 deep into the start function at a i32.store offset=4 instruction.
The text was updated successfully, but these errors were encountered:
Not sure if this is minimal enough to be helpful, but we're hitting this error when calling futures::sync::mpsc::unbounded. Here is a gist in case it's at all useful.
With the current nightly builds (1.24.0-nightly (73bca2b 2017-11-28)), some (I assume most) programs are unrunnable on wasm32-unknown-unknown (tested in Firefox 56.0) unless compiled with optimization flags. The condition appears somewhere between where the start function and main is called in this example, but I've also tested overriding the start function to a no-op, and then the most simple functions (just returning an integer) worked, but anything that called another function didn't.
Steps to reproduce:
as demo.rs; compile with
rustc +nightly --target wasm32-unknown-unknown -O demo.rs
and serve together with this index.html:… and the console will print
84
. Leave out the-O
, and instead, the console will giveRuntimeError: index out of bounds
, with a stack trace 7 deep into the start function at ai32.store offset=4
instruction.The text was updated successfully, but these errors were encountered: