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

Investigate handling of type IDs #402

Open
electrum opened this issue Jun 21, 2024 · 2 comments
Open

Investigate handling of type IDs #402

electrum opened this issue Jun 21, 2024 · 2 comments

Comments

@electrum
Copy link
Collaborator

The following methods evaluate type IDs:

  • com.dylibso.chicory.runtime.TypeValidator#getReturns
  • com.dylibso.chicory.runtime.InterpreterMachine#numberOfValuesToReturn
  • com.dylibso.chicory.aot.AotMachine#blockType

They compare the value to the special 0x40 epsilon value and the ID constants. Unless I'm missing something, these will return the wrong result for modules with more than 64 types (which seems not to be covered by the specification testsuite). I believe this needs to be handled in the parser when decoding the binary type ID values.

@andreaTP
Copy link
Collaborator

I think that the implementation is following the spec in this case, in this regard, please note that 0x40 is not an upper bound, but a "reserved value".
Have you found any error?
Would you be able to provide a reproducer?

@andreaTP
Copy link
Collaborator

@electrum do you think this issue is still relevant?

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