diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-01-22 16:23:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 16:23:09 -0800 |
commit | cfc581f7d3c629016aa382a7e915f8b0a955fb40 (patch) | |
tree | 0ec22a6f0d1275c51a6734a23e1a33db12b65ded /src/wasm-binary.h | |
parent | 60cfc85293c18ca49b25daa4328e5902d4130dae (diff) | |
download | binaryen-cfc581f7d3c629016aa382a7e915f8b0a955fb40.tar.gz binaryen-cfc581f7d3c629016aa382a7e915f8b0a955fb40.tar.bz2 binaryen-cfc581f7d3c629016aa382a7e915f8b0a955fb40.zip |
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.
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |