You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
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.
@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:
explicit say vdash limit 2^32.
instantiate a valid tabletype judgement with funcref, i.e. vdash limit funcref ok.
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.
@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
Activity
[-]valid limit ok seems not well-defined[/-][+][spec] valid limit ok seems not well-defined[/+]rossberg commentedon Oct 15, 2019
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?
Huxpro commentedon Oct 15, 2019
@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:vdash limit 2^32.funcref, i.e.vdash limit funcref ok.I guess (2) is preferable?
rossberg commentedon Oct 16, 2019
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.
Huxpro commentedon Oct 17, 2019
@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
Huxpro commentedon Oct 21, 2019
Closed by WebAssembly/spec#1093