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/
Этот коммит содержится в:
родитель
d627208c48
коммит
00cc486619
1 изменённых файлов: 1 добавлений и 0 удалений
|
@ -14,6 +14,7 @@
|
||||||
"ldflags": [
|
"ldflags": [
|
||||||
"--allow-undefined",
|
"--allow-undefined",
|
||||||
"--no-threads",
|
"--no-threads",
|
||||||
|
"--stack-first",
|
||||||
"--export-all"
|
"--export-all"
|
||||||
],
|
],
|
||||||
"emulator": ["node", "targets/wasm_exec.js"]
|
"emulator": ["node", "targets/wasm_exec.js"]
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче