diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-08-18 21:30:05 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-08-18 21:43:35 +0200 |
| commit | 73e766f8f6ec248bd2bf023af32ef45f40d05d39 (patch) | |
| tree | d81b4f71db62b9e7673e4d05186bfbb576ec311c /runtime/lua/vim/range.lua | |
| parent | c184ca2c68abfc6864c7fc64d7b3c3e657afd7a8 (diff) | |
| download | rneovim-73e766f8f6ec248bd2bf023af32ef45f40d05d39.tar.gz rneovim-73e766f8f6ec248bd2bf023af32ef45f40d05d39.tar.bz2 rneovim-73e766f8f6ec248bd2bf023af32ef45f40d05d39.zip | |
fix(lifecycle): json_create_config leak
Problem:
As it turns out, when you have 17 different ways to "exit", you need to
plug 17 different holes.
Leak still reported by ASAN CI, even after 1eae512285e7 f238788601eb.
ERROR: LeakSanitizer: detected memory leaks
strbuf_init src/cjson/strbuf.c:62:22
json_create_config src/cjson/lua_cjson.c:635:5
lua_cjson_new src/cjson/lua_cjson.c:2060:5
nlua_state_add_stdlib src/nvim/lua/stdlib.c:840:3
nlua_state_init src/nvim/lua/executor.c:973:3
Analysis:
`os_breakcheck()` may process a `exit_event` placed by
`exit_on_closed_chan()` during shutdown. This would re-enter
`preserve_exit()`, which then skips everything because it sees
`really_exiting=true`.
Solution:
Set `exiting` in `preserve_exit()`, not only in `getout()`.
Diffstat (limited to 'runtime/lua/vim/range.lua')
0 files changed, 0 insertions, 0 deletions