diff options
author | Heschi Kreinick <heschi@google.com> | 2021-10-07 19:02:56 -0400 |
---|---|---|
committer | Heschi Kreinick <heschi@google.com> | 2021-10-07 19:02:56 -0400 |
commit | 35d5cd0dcfb9d06064ec37da1621d24676454058 (patch) | |
tree | 5319064d4c2970a6d3be069b9c2a0e273f0f14dd /misc/wasm/wasm_exec.js | |
parent | 0d02a0d966b6d307ac33e3df3687948b74408569 (diff) | |
parent | c580180744e60d6c84fc0b59d634fcff01290780 (diff) | |
download | go-35d5cd0dcfb9d06064ec37da1621d24676454058.tar.gz go-35d5cd0dcfb9d06064ec37da1621d24676454058.zip |
[dev.boringcrypto.go1.16] all: merge go1.16.9 into dev.boringcrypto.go1.16
Change-Id: Ic26e9802fe13c491fcc26f34b8847779ac43cfe2
Diffstat (limited to 'misc/wasm/wasm_exec.js')
-rw-r--r-- | misc/wasm/wasm_exec.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/wasm/wasm_exec.js b/misc/wasm/wasm_exec.js index 82041e6bb9..a0a264278b 100644 --- a/misc/wasm/wasm_exec.js +++ b/misc/wasm/wasm_exec.js @@ -564,6 +564,13 @@ offset += 8; }); + // The linker guarantees global data starts from at least wasmMinDataAddr. + // Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr. + const wasmMinDataAddr = 4096 + 4096; + if (offset >= wasmMinDataAddr) { + throw new Error("command line too long"); + } + this._inst.exports.run(argc, argv); if (this.exited) { this._resolveExitPromise(); |