Wasmer panics while other runtimes output "funcref".
Author: teyahb8Created Jul 11, 2025Updated Aug 30, 2026
Describe the bug
I executed the following test case on different runtimes like Wasmtime, WAMR, and Wasmer. Wasmtime and WAMR runtimes output "funcref" but Wasmer runtime panics with both cranelift and llvm backends.
Test case:
(module
(type (;0;) (func (param i32 i32 i32 i32) (result i32)))
(type (;1;) (func (param i32)))
(type (;2;) (func))
(type (;3;) (func (result i32)))
(type (;4;) (func (result funcref)))
(table (;0;) 10 20 funcref)
(memory (;0;) 1 5)
(global (;0;) i32 i32.const 541)
(global (;1;) (mut i32) i32.const 191)
(global (;2;) f32 f32.const 0x1.0e8p+9 (;=541;))
(global (;3;) (mut f32) f32.const 0x1.8p+7 (;=192;))
(global (;4;) i64 i64.const 54)
(global (;5;) (mut i64) i64.const 19)
(global (;6;) f64 f64.const 0x1.bp+5 (;=54;))
(global (;7;) (mut f64) f64.const 0x1.3p+4 (;=19;))
(global (;8;) (mut i32) i32.const 0)
(global (;9;) (mut f32) f32.const 0x0p+0 (;=0;))
(global (;10;) (mut i64) i64.const 0)
(global (;11;) (mut f64) f64.const 0x0p+0 (;=0;))
(export "main" (func 0))
(export "to_test" (func 0))
(elem (;0;) (i32.const 0) func 1 2 3 0 1)
(elem (;1;) (i32.const 5) func 3 3 2 1)
(elem (;2;) (i32.const 9) func 0)
(func (;0;) (type 4) (result funcref)
(local i32 f32 i64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64 f64)
i32.const 305419896
local.set 0
f32.const 0x1.8cp+6 (;=99;)
local.set 1
i64.const -72057589709208571
local.set 2
f64.const 0x1.5f0b08c960a79p+109 (;=890000000000000000000000000000000;)
local.set 3
i32.const 9
table.get 0
local.get 0
global.set 8
local.get 1
global.set 9
local.get 2
global.set 10
local.get 3
global.set 11
)
(func (;1;) (type 3) (result i32)
i32.const 1
i32.const 3
i32.add
)
(func (;2;) (type 3) (result i32)
i32.const 2
i32.const 3
i32.add
)
(func (;3;) (type 3) (result i32)
i32.const 3
i32.const 3
i32.add
)
(data (;0;) (i32.const 8) "\01\02\03\04\05\06\07\08")
(data (;1;) (i32.const 16) "\01\02\03\04\05\06\07\08\ff")
(data (;2;) (i32.const 32) "\01\02\03\04\05\06\07\08\ff")
)Environment:
$> wasmer -vV; rustc -vV
wasmer 6.0.0 (9ef4e4e 2025-06-27)
binary: wasmer-cli
commit-hash: 9ef4e4e7382b53c06aaadf4aa864b726c4851dc3
commit-date: 2025-06-27
host: x86_64-unknown-linux-gnu
runtimes: singlepass, cranelift, llvm
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5OS (Ubuntu 22.04), Arch (x86_64)
Steps to reproduce
- Run:
wasmer run --enable-simd --enable-threads --enable-verifier --enable-reference-types --enable-multi-value --enable-bulk-memory --enable-relaxed-simd --enable-extended-const --cranelift test.wasm --invoke to_test - Run:
wasmer run --enable-simd --enable-threads --enable-verifier --enable-reference-types --enable-multi-value --enable-bulk-memory --enable-relaxed-simd --enable-extended-const --llvm test.wasm --invoke to_test
Expected behavior
Should output: funcref
Actual behavior
thread 'main' panicked at wasmer/lib/api/src/backend/sys/entities/function/mod.rs:393:14:
Signature not found in storeAdditional context
Can you please confirm if this is a bug? Thanks in advance.
Source: wasmerio/wasmer