Merge pull request #3181 from tree-sitter/handle-wasm-oom
When loading languages via WASM, gracefully handle memory errors and leaks in external scanners
This commit is contained in:
commit
09b18fad5b
13 changed files with 1895 additions and 2463 deletions
|
|
@ -81,7 +81,6 @@ fn record_alloc(ptr: *mut c_void) {
|
|||
}
|
||||
|
||||
fn record_dealloc(ptr: *mut c_void) {
|
||||
assert!(!ptr.is_null(), "Zero pointer deallocation!");
|
||||
RECORDER.with(|recorder| {
|
||||
if recorder.enabled.load(SeqCst) {
|
||||
recorder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue