vouillon added the bug label to Issue #10459.
vouillon opened issue #10459:
Test Case
Steps to Reproduce
Run the following command:
./target/debug/wasmtime -W=all-proposals=y fail.wasm
Expected Results
It should not crash.
Actual Results
We get a panic:
thread 'main' panicked at /home/jerome/sources/wasmtime/crates/slab/src/lib.rs:387:14: id from different slab
Versions and Environment
Wasmtime commit: dbed370c8a0e1522c33a7cb8e086f04cffcf8378 (PR #10456)
Operating system: Linux
Architecture: x64
fitzgen commented on issue #10459:
Thanks! Will look into this next week
fitzgen commented on issue #10459:
Ah, it turns out that our struct field packing/reordering is invalid in the presence of subtyping. D'oh.
fitzgen commented on issue #10459:
Slightly reduced test case:
(module (type $func (func)) (type $super (sub (struct (field (ref $func))))) (type $sub (sub final $super (struct (field (ref $func)) (field (ref eq))))) (elem declare func $f) (func $f) (func (export "_start") (drop (struct.get $super 0 (struct.new $sub (ref.func $f) (ref.i31 (i32.const 0))))) ) )
fitzgen closed issue #10459:
Test Case
Steps to Reproduce
Run the following command:
./target/debug/wasmtime -W=all-proposals=y fail.wasm
Expected Results
It should not crash.
Actual Results
We get a panic:
thread 'main' panicked at /home/jerome/sources/wasmtime/crates/slab/src/lib.rs:387:14: id from different slab
Versions and Environment
Wasmtime commit: dbed370c8a0e1522c33a7cb8e086f04cffcf8378 (PR #10456)
Operating system: Linux
Architecture: x64
Last updated: Apr 17 2025 at 19:03 UTC