diff options
| author | Ryan Patterson <cgamesplay@cgamesplay.com> | 2026-06-16 20:22:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-16 08:22:33 -0400 |
| commit | 355d010ddf1dac50fe72ab36fbfdddef2a60a379 (patch) | |
| tree | 7242559f83bf4e9aaa13a184b27c11779d083821 /test/functional/vimscript/executable_spec.lua | |
| parent | 823517ad1d5df03914c55ec7ca5daa504734530d (diff) | |
| download | rneovim-355d010ddf1dac50fe72ab36fbfdddef2a60a379.tar.gz rneovim-355d010ddf1dac50fe72ab36fbfdddef2a60a379.tar.bz2 rneovim-355d010ddf1dac50fe72ab36fbfdddef2a60a379.zip | |
fix(treesitter): give each wasm parser its own TSWasmStore #40163
All wasm parsers shared a single global TSWasmStore via
ts_parser_set_wasm_store(). A TSWasmStore is owned by exactly one parser:
ts_parser_delete() frees it through ts_wasm_store_delete(). So the first
wasm parser collected freed the shared store, leaving the global pointer
dangling, and creating the next wasm parser dereferenced freed memory in
ts_wasm_store_reset() -> wasmtime_store_context(), crashing with SIGSEGV.
Give each parser its own store via ts_wasm_store_new() instead. This is
the 1:1 store-per-parser model intended by tree-sitter (see
tree-sitter/tree-sitter#3454): the global store remains only as the
language loader, ts_parser_delete() cleanly frees each parser's own
store, and the wasm engine is shared safely because ts_wasm_store_new()
clones its engine reference internally.
AI-assisted: Claude Code
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions