Closed
Description
I bisected by hand and at nightly-2025-02-18
wasm-opt
started giving errors like this:
...
[wasm-validator error in function 2590] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
(local.get $0)
(i32.add
(local.get $4)
(i32.const 8)
)
(i32.const 40)
)
[wasm-validator error in function 2621] unexpected false: Bulk memory operations require bulk memory [--enable-bulk-memory], on
(memory.copy
(i32.add
(local.get $2)
(i32.shl
(local.get $8)
(i32.const 2)
)
)
(i32.add
(local.get $2)
(i32.shl
(local.get $0)
(i32.const 2)
)
)
(local.get $5)
)
...
It asks for --enable-bulk-memory
, if give it to it, other errors reveal (this is the whole output):
> wasm-opt -Oz project.wasm -o new.wasm --enable-bulk-memory
[wasm-validator error in function 520] unexpected false: all used features should be allowed, on
(i32.trunc_sat_f32_s
(f32.mul
(local.get $13)
(f32.const 20)
)
)
[wasm-validator error in function 520] unexpected false: all used features should be allowed, on
(i32.trunc_sat_f32_u
(local.tee $13
(f32.add
(local.get $13)
(f32.const 60)
)
)
)
[wasm-validator error in function 1103] unexpected false: all used features should be allowed, on
(i32.trunc_sat_f64_u
(local.tee $4
(call $fimport$187
(i32.load
(i32.load
(local.get $1)
)
)
(i32.load offset=12
(local.get $2)
)
)
)
)
[wasm-validator error in function 1120] unexpected false: all used features should be allowed, on
(i64.trunc_sat_f64_s
(local.get $4)
)
[wasm-validator error in function 1908] unexpected false: all used features should be allowed, on
(i64.trunc_sat_f64_u
(local.get $9)
)
Fatal: error validating input
For wasm-opt
I tried versions form 116 to 120, all failed.
I am compiling web application with dioxus
, it uses wasm-bindgen
.
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Documentation for any part of the project, including the compiler, standard library, and toolsCategory: Discussion or questions that doesn't represent real issues.Target: WASM (WebAssembly), http://webassembly.org/Relevant to the compiler team, which will review and decide on the PR/issue.