From 3a14394640be0a91d44306d989b27a4009c9ca45 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Tue, 30 Dec 2025 19:17:57 -0600 Subject: [PATCH] feat: add go_js_wasm_exec script to increase V8 stack size for WebAssembly tests --- misc/wasm/go_js_wasm_exec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 misc/wasm/go_js_wasm_exec diff --git a/misc/wasm/go_js_wasm_exec b/misc/wasm/go_js_wasm_exec new file mode 100755 index 0000000..ff59257 --- /dev/null +++ b/misc/wasm/go_js_wasm_exec @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Copyright 2018 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +# Increase the V8 stack size from the default of 984K +# to 8192K to ensure all tests can pass without hitting +# stack size limits. +exec node --stack-size=8192 "$DIR/wasm_exec_node.js" "$@"