Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM validator module #18

Open
axic opened this issue Nov 17, 2018 · 6 comments
Open

WASM validator module #18

axic opened this issue Nov 17, 2018 · 6 comments

Comments

@axic
Copy link
Member

axic commented Nov 17, 2018

This should do semantic validation of the module according to the Wasm specification.

Must also first check how much of that is done by pwasm.

@zixuanzh
Copy link

zixuanzh commented Nov 17, 2018

WASM specifies semantics here and pwasm does checking in places like here but not in the module itself. Is the goal of this module to have those semantic validation as shown in pwasm/examples in one place?

@axic
Copy link
Member Author

axic commented Nov 17, 2018

This task has three parts:

  1. Reviewing/documenting the semantic validation steps needed https://webassembly.github.io/spec/core/valid/index.html
  2. Reviewing pwasm how much of that validation is implemented: https://github.com/paritytech/parity-wasm
  3. Implementing the missing steps here.

@zixuanzh
Copy link

zixuanzh commented Dec 6, 2018

@Steampunkery and I implemented verification for a subset of numeric instructions in our fork. parity-wasm checks types for const operators but not for binary as specified in the spec.

We simulated the stack to check for types and hence we added a new validator interface that takes in a mutable self reference. We also use a self defined enum instead of String for error handling and propagation as advised by the documentation. We will be happy to submit a PR if it will be helpful to wasm-chisel.

@axic
Copy link
Member Author

axic commented Dec 6, 2018

Can you please open a PR? We can review it that way.

@pepyakin
Copy link

There is no validation in parity-wasm left and everything migrated to wasmi (see this). Moreover, when we started compiling wasm into internal wasmi IR validation became mixed with compilation concerns.

There was some interest in creating a separate reusable crate from third-parties. I think parity will need this as well at some point.

@axic
Copy link
Member Author

axic commented Dec 18, 2018

@pepyakin thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants