port to zig 0.16.0#242
Conversation
72f915f to
8451a94
Compare
|
Thanks for this @dasimmet. Are you able to explain the LEB128 issue a bit more as you understand it? Would be great not to have to vendor the code so I'm keen to understand if there are any alternatives here before committing to that. |
|
The new implementation of 0.16 takeLeb will happily keep reading bytes from the reader as long as the continuation bit is set due to the final while loop, even if its more than 5 bytes (for 32bit ints): 22dc32f#diff-2bc993f98f63c8cc2df8f9246692eae522dad0cdda50e48e692803979a04662bL95 The wasm spec forbids such "overlong" leb128 values, while technically i think they are valid. Thats what these "integer representation too long" cases test. I guess we can search or file an issue with zig to see if std behavior is intentional, or check after calling takeleb128 if more bytes were consumed maybe |
c892595 to
a917832
Compare
also works for master (0.17.0-dev.864+3deb86baf) adapt errors in testrunner cases adapt errors in testrunner cases
|
Thanks @dasimmet |
seems to work for me so far, but i had to vendor the new standard library
std.Io.Reader.takeLeb128to make it not read extra bytes to pass the test suite.
also error enums returned from
std.Io.Reader.takeEnumchanged toerror.InvalidEnumTagand i had to adapt testsuite errors to match.