Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update binary encoding to use varuint32 for flags (WebAssembly#35)
This commit fixes WebAssembly#34 by specifying that the flags field (which indicates if a segment is passive) is a `varuint32` instead of a `uint8`. It was discovered in WebAssembly#34 that the memory index located at that position today is a `varuint32`, which can be validly encoded as `0x80 0x00` in addition to `0x00` (in addition to a number of other encodings). This means that if the first field were repurposed as a single byte of flags, it would break these existing modules that work today. It's not currently known how many modules in the wild actually take advantage of such an encoding, but it's probably better to be safe than sorry! Closes WebAssembly#34
- Loading branch information