f52985 added the bug label to Issue #10407.
f52985 opened issue #10407:
Test Case
;; global.wast (module (global $g (mut anyref) ;; or eqref ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) ) (func (export "f") ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) (global.set $g) ) ) (assert_return (invoke "f"))
;; table.wast (module (table $t i32 1 anyref ;; or eqref ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) ) (func (export "f") (i32.const 0) ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) (table.set $t) ) ) (assert_return (invoke "f"))
Steps to Reproduce
wasmtime wast -W gc=y global.wast
wasmtime wast -W gc=y -W function-references=y table.wast
Expected Results
Ternimates normally
Actual Results
[1] 57797 illegal hardware instruction wasmtime wast -W gc=y global.wast
[1] 57844 illegal hardware instruction wasmtime wast -W gc=y -W function-references=y table.wast
Versions and Environment
Wasmtime version or commit: wasmtime 30.0.2 (398694a59 2025-02-25)
Operating system: MacOS Sonoma 14.5(23F79) (Also confirmed on Ubuntu 20.04.6 LTS)
Architecture: Apple M3
Extra Info
There are some specific requirements for triggering this bug:
global.set
ortable.set
is required. The bug is not triggered forglobal.get
ortable.get
.- There are two
ref.i31
values for each module: the initializer value, and the new value being set. At least one number that goes into theref.i31
should be larger than or equal to 262,136 (Perhaps it has something to do with the fact that2^18 == 262,144
?)- The global type or table type must be
anyref
oreqref
. The bug is not triggered for non-nullable references (ref any
,ref eq
), or i31 references (i31ref
)These might be helpful for localizing the root cause.
alexcrichton added the fuzz-bug label to Issue #10407.
alexcrichton assigned fitzgen to issue #10407.
fitzgen commented on issue #10407:
Thanks for filing, the reduced test case, and the extra info!
fitzgen commented on issue #10407:
Hm, I'm not able to reproduce on
main
at commit1ea710d60a
with either test case.
fitzgen commented on issue #10407:
FWIW, I am on x86_64, not aarch64, but I really wouldn't expect that to make a difference here.
f52985 closed issue #10407:
Test Case
;; global.wast (module (global $g (mut anyref) ;; or eqref ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) ) (func (export "f") ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) (global.set $g) ) ) (assert_return (invoke "f"))
;; table.wast (module (table $t i32 1 anyref ;; or eqref ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) ) (func (export "f") (i32.const 0) ;;(i32.const 262_135) ;; OK (i32.const 262_136) (ref.i31) (table.set $t) ) ) (assert_return (invoke "f"))
Steps to Reproduce
wasmtime wast -W gc=y global.wast
wasmtime wast -W gc=y -W function-references=y table.wast
Expected Results
Ternimates normally
Actual Results
[1] 57797 illegal hardware instruction wasmtime wast -W gc=y global.wast
[1] 57844 illegal hardware instruction wasmtime wast -W gc=y -W function-references=y table.wast
Versions and Environment
Wasmtime version or commit: wasmtime 30.0.2 (398694a59 2025-02-25)
Operating system: MacOS Sonoma 14.5(23F79) (Also confirmed on Ubuntu 20.04.6 LTS)
Architecture: Apple M3
Extra Info
There are some specific requirements for triggering this bug:
global.set
ortable.set
is required. The bug is not triggered forglobal.get
ortable.get
.- There are two
ref.i31
values for each module: the initializer value, and the new value being set. At least one number that goes into theref.i31
should be larger than or equal to 262,136 (Perhaps it has something to do with the fact that2^18 == 262,144
?)- The global type or table type must be
anyref
oreqref
. The bug is not triggered for non-nullable references (ref any
,ref eq
), or i31 references (i31ref
)These might be helpful for localizing the root cause.
f52985 commented on issue #10407:
Thanks for checking! I also tested again on the commit (1ea710d60a) and can confirm that the issue is no longer reproducible. It looks like it was fixed somewhere along the way. I'll go ahead and close the issue.
alexcrichton commented on issue #10407:
Bisection shows this was fixed in #10221
Last updated: Apr 18 2025 at 22:03 UTC