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

[Question] How to do type evaluation in Binaryen? #6476

Open
hungryzzz opened this issue Apr 7, 2024 · 1 comment
Open

[Question] How to do type evaluation in Binaryen? #6476

hungryzzz opened this issue Apr 7, 2024 · 1 comment

Comments

@hungryzzz
Copy link

Hi, I found that when I use WasmBinaryReader to parse a type-mismatched wasm file, it would not raise error messages. So I just wonder could I do the type evaluation in Binaryen? i.e., Simulate execution on an abstract stack to determine whether there is a type mismatch. Thank you!

(; example of type-mismatched code ;)
global.get 0
i32.const 32
i64.sub
@hungryzzz hungryzzz changed the title [Question] How to do the type evaluation in Binaryen? [Question] How to do type evaluation in Binaryen? Apr 7, 2024
@kripken
Copy link
Member

kripken commented Apr 7, 2024

To check if the module is valid you also need to run validation,

https://github.com/WebAssembly/binaryen/blob/main/src/wasm-validator.h

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

2 participants