Skip to content

v2.11.1

Latest

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 05 Sep 01:48

What's Changed in v2.11.1

Bug fixes

  • A failure inside the WebAssembly codec is now reported as the error it is instead of surfacing as RangeError: offset is out of bounds. The deflate_process, inflate_process and inflate9_process functions pack the number of bytes produced in the low 24 bits and the zlib status code in the top byte, but their two error paths returned a bare negative code, read as 16777214 bytes produced and copied out of the module heap into a 64KB buffer. Reaching it takes the codec running out of its fixed 16MB heap, which needs useCompressionStream and useWebWorkers both set to false, so that every entry shares one module instance, and maxWorkers raised above the number of streams the heap holds, 42 measured when compressing at level 6
  • The compress direction of the WebAssembly codec now checks the status code the codec returns, which only the decompress direction did. A failed deflate() reports no byte produced and no byte consumed, which the loop reads as the end of the data, so the rest of the entry was dropped without an error. The status is also checked before the number of bytes produced is used, so a status code can no longer be read as a byte count whatever the codec returns

Tests and continuous integration

  • New test asserting that the vendored WebAssembly module packs its error codes the way the codec expects. The module is vendored as a binary, so nothing else in the suite would notice it being re-vendored stale