If I set enable_verifier = false to get a speedup (with opt_level = "speed"), I get a panic in alias analysis:
thread '<unnamed>' panicked at /home/epilys/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cranelift-codegen-0.123.2/src/alias_analysis.rs:232:76:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::option::unwrap_failed
4: cranelift_codegen::alias_analysis::AliasAnalysis::compute_block_input_states::{{closure}}
5: cranelift_codegen::alias_analysis::AliasAnalysis::new
6: cranelift_codegen::context::Context::optimize
7: cranelift_codegen::context::Context::compile_stencil
8: cranelift_codegen::context::Context::compile
9: <cranelift_jit::backend::JITModule as cranelift_module::module::Module>::define_function_with_control_plane
...
This must be a bug, but while trying to work around it I found something that might also be a bug: Setting enable_alias_analysis = false in the flags does not make a difference.
In fact searching for "alias_analysis" string in the wasmtime repo does not yield any instances of the flag setting been read. Is it being ignored?
I'm not sure if enable_alias_analysis = false should be a valid workaround. If it should be I can file two separate bugs.
Last updated: Dec 06 2025 at 05:03 UTC