WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.13k stars 445 forks source link

test case `as-load-operand` have an error #1714

Closed ofzo closed 9 months ago

ofzo commented 9 months ago

There seems to be an error in this test case, calling the as-load-operand function in Chrome gives a result of 0, whereas the expected value in the test case is 1

https://github.com/WebAssembly/spec/blob/c7eef192b77125b88a4ab3ae7a944d10c0860f55/test/core/block.wast#L392C1-L392C57

(assert_return (invoke "as-load-operand") (i32.const 1))
image
rossberg commented 9 months ago

Tests are scripts that have to be executed sequentially. In particular, this test invokes as-store-first prior to calling this function, which mutates the memory accordingly. Hence everything is working as expected.