Closed Bug 1523908 Opened 5 years ago Closed 5 years ago

Track / conform to spec encoding of reserved zero byte for memory / table index

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

Currently we're decoding the "reserved index" byte for source/target memories/tables as a varuint32, while the spec has u8-must-be-zero.

Once we land reftypes the table index will necessarily become a varuint32, but until then, I'm having a slightly difficult time pushing through a change so that all of them are varuint32. See https://github.com/WebAssembly/bulk-memory-operations/issues/36#issuecomment-457550639 et seq.

If my proposal is rejected then we must update the code so that (a) for memories we decode as a byte always and it must be zero and (b) if bulk-memory is defined but reftypes is not then for tables we decode ditto, but if reftypes is defined then we decode as varuint32.

The sentiment is to keep this as a zero byte, so we need to update our code (slightly) here.

Attachment #9041145 - Flags: review?(jseward)
Comment on attachment 9041145 [details] [diff] [review]
bug1523908-zero-placeholder-index-byte.patch

Review of attachment 9041145 [details] [diff] [review]:
-----------------------------------------------------------------

Nicely future-proofed.  Looks fine.
Attachment #9041145 - Flags: review?(jseward) → review+
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1431d60aedcc
Require zero byte encoding for memory/table index in the absence of multi-memory/multi-table. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: