From 16c6b44da64630cd6906433cf35edabcea93cffc Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 12 Dec 2019 19:15:39 -0800 Subject: Support stack overflow checks in standalone mode (#2525) In normal mode we call a JS import, but we can't import from JS in standalone mode. Instead, just trap in that case with an unreachable. (The error reporting is not as good in this case, but at least it catches all errors and halts, and the emitted wasm is valid for standalone mode.) Helps emscripten-core/emscripten#10019 --- scripts/test/lld.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/test') diff --git a/scripts/test/lld.py b/scripts/test/lld.py index f509059de..992a35655 100755 --- a/scripts/test/lld.py +++ b/scripts/test/lld.py @@ -19,14 +19,14 @@ from . import support def args_for_finalize(filename): + ret = ['--global-base=568'] if 'safe_stack' in filename: - return ['--check-stack-overflow', '--global-base=568'] - elif 'shared' in filename: - return ['--side-module'] - elif 'standalone-wasm' in filename: - return ['--standalone-wasm', '--global-base=568'] - else: - return ['--global-base=568'] + ret += ['--check-stack-overflow'] + if 'shared' in filename: + ret += ['--side-module'] + if 'standalone-wasm' in filename: + ret += ['--standalone-wasm'] + return ret def test_wasm_emscripten_finalize(): -- cgit v1.2.3