Closed zherczeg closed 1 year ago
I have found a bug:
(module (func (export "defNull") (result externref) (local externref) local.get 0 ) ) (assert_return (invoke "defNull") (ref.null extern))
This fails because the memory is initialized to zero, and null is defined as ~0. I checked wabt, and they use 0 as null: https://github.com/Samsung/walrus/blob/interp/third_party/wabt/src/interp/interp.cc#L55
~0
There is a test with (ref.extern 0), which should pass. I think we can do the same thing as the wabt test runner: https://github.com/Samsung/walrus/blob/interp/third_party/wabt/src/tools/spectest-interp.cc#L825
(ref.extern 0)
I have found a bug:
This fails because the memory is initialized to zero, and null is defined as
~0
. I checked wabt, and they use 0 as null: https://github.com/Samsung/walrus/blob/interp/third_party/wabt/src/interp/interp.cc#L55There is a test with
(ref.extern 0)
, which should pass. I think we can do the same thing as the wabt test runner: https://github.com/Samsung/walrus/blob/interp/third_party/wabt/src/tools/spectest-interp.cc#L825