Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

[spec] valid limit ok seems not well-defined #29

Closed

Activity

  1. changed the title [-]valid limit ok seems not well-defined[/-] [+][spec] valid limit ok seems not well-defined[/+] on Oct 15, 2019
  2. rossberg commented on Oct 15, 2019

    @rossberg
    Member

    Ah, good find. This is actually wrong in the main spec. The judgement changed from the former to the form with the k at some point, but it seems like I forgot to adapt the occurrences in the rules for tableinst and moduleinst.

    Care to create a PR against the main spec?

  3. Huxpro commented on Oct 15, 2019

    @Huxpro
    ContributorAuthor

    @rossberg will do!
    I couldn't find out the use of "valid limit" rule in the moduleinst. Could you point out?
    If I understood it correct, I could image two fixes for the tableinst:

    1. explicit say vdash limit 2^32.
    2. instantiate a valid tabletype judgement with funcref, i.e. vdash limit funcref ok.

    I guess (2) is preferable?

  4. rossberg commented on Oct 16, 2019

    @rossberg
    Member

    The minimal and direct fix is (1), i.e., to replace "\ok" with ": 2^K" in the two instance rules, where K is 32 for tables and 16 for memories. I would go for that.

    The perhaps nicer but much more extensive fix would be to change the definition of tableinst and meminst to actually store tabletypes and memtypes instead of just limits. That's a change I had to make for the reference types proposal (along with the analogous change for globalinst). If you feel like it, you could backport that change, but I wouldn't necessarily recommend spending the time on it.

  5. Huxpro commented on Oct 17, 2019

    @Huxpro
    ContributorAuthor

    @rossberg two PRs respectively have been made against the main spec.
    Personally, I prefer (2) even more after looking at the reference-type proposal spec you mentioned. See reasons in WebAssembly/spec#1094

  6. Huxpro commented on Oct 21, 2019

    @Huxpro
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions