wasmparser icon indicating copy to clipboard operation
wasmparser copied to clipboard

Fix OperatorValidator for floating-point (non-deterministic) opcodes

Open camilbancioiu opened this issue 5 years ago • 3 comments

This pull request fixes an inverted if in check_non_deterministic_enabled(), which was allowing floating-point opcodes even when deterministic_only was set to true.

Also renames check_non_deterministic_enabled() to check_deterministic_only(), to make it clearer.

On the master branch, Cargo.toml defines the deterministic feature, which seems to be enabled during the CI tests (is it?). The test which parses the file float_memory.0.wasm doesn't expect an error, and fails with the fixed OperatorValidator. Is the test correct?

camilbancioiu avatar Mar 05 '20 16:03 camilbancioiu

On the master branch, Cargo.toml defines the deterministic feature, which seems to be enabled during the CI tests (is it?)

It is defined, but not enabled (as default features)

The test which parses the file float_memory.0.wasm doesn't expect an error, and fails with the fixed OperatorValidator. Is the test correct?

The test is correct.

yurydelendik avatar Mar 05 '20 18:03 yurydelendik

@yurydelendik Thank you for your quick reply. I'll look deeper into this, it might be an issue somewhere else (we're using Wasmer, which in turn relies on Wasmparser).

camilbancioiu avatar Mar 06 '20 09:03 camilbancioiu

This repository has now moved to a subfolder within https://github.com/bytecodealliance/wasm-tools. This current repository will be marked as archived in the future after we've sorted out active PRs, so if you'd like to still merge this then it will need to be opened as a new PR against the new repository. If you have any trouble in doing so, though, please let me know and I can try to help out. now

alexcrichton avatar May 20 '20 15:05 alexcrichton