wasm: set the stack at the start of linear memory

This makes sure that a stack overflow will cause a "memory access out of
bounds" error instead of a corruption of a global variable.

Here is more background on a very similar stack overflow protection:
https://blog.japaric.io/stack-overflow-protection/
Этот коммит содержится в:
Ayke van Laethem 2019-07-07 19:49:11 +02:00 коммит произвёл Ron Evans
родитель d627208c48
коммит 00cc486619

Просмотреть файл

@ -14,6 +14,7 @@
"ldflags": [
"--allow-undefined",
"--no-threads",
"--stack-first",
"--export-all"
],
"emulator": ["node", "targets/wasm_exec.js"]