From cfc581f7d3c629016aa382a7e915f8b0a955fb40 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 22 Jan 2020 16:23:09 -0800 Subject: Limit the number of passive segments to work around a Chrome bug (#2613) Chrome is currently decoding the segment indices as signed numbers, so some ranges of indices greater than 63 do not work. As a temporary workaround, limit the number of segments produced by MemoryPacking to 63 when bulk-memory is enabled. --- src/wasm-binary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm-binary.h') diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 5cfafb509..0dd8be61a 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -47,7 +47,7 @@ enum { // wasm VMs on the web have decided to impose some limits on what they // accept -enum WebLimitations { +enum WebLimitations : uint32_t { MaxDataSegments = 100 * 1000, MaxFunctionBodySize = 128 * 1024, MaxFunctionLocals = 50 * 1000 -- cgit v1.2.3