mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
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/
This commit is contained in:
committed by
Ron Evans
parent
d627208c48
commit
00cc486619
@@ -14,6 +14,7 @@
|
||||
"ldflags": [
|
||||
"--allow-undefined",
|
||||
"--no-threads",
|
||||
"--stack-first",
|
||||
"--export-all"
|
||||
],
|
||||
"emulator": ["node", "targets/wasm_exec.js"]
|
||||
|
||||
Reference in New Issue
Block a user