Handle memory errors occurring in wasm scanners
* In WASM, use a custom, simple malloc implementation that lets us expicitly reset the heap with a new start location. * When a WASM call traps or errors, propagate that as a parse failure. * Reset the WASM heap after every parse. Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
b19d85aca7
commit
7a9b3076ef
9 changed files with 1795 additions and 2384 deletions
|
|
@ -62,6 +62,7 @@ pub fn compile_language_to_wasm(
|
|||
"__cxa_atexit",
|
||||
"abort",
|
||||
"emscripten_notify_memory_growth",
|
||||
"tree_sitter_debug_message",
|
||||
"proc_exit",
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue