mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(vim.system): close check handle (#24270)
Fix hang after running vim.system() with sanitizers.
This commit is contained in:
parent
25e62697c3
commit
2afb04758c
@ -287,6 +287,7 @@ function M.run(cmd, opts, on_exit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
check:stop()
|
check:stop()
|
||||||
|
check:close()
|
||||||
|
|
||||||
state.done = true
|
state.done = true
|
||||||
state.result = {
|
state.result = {
|
||||||
|
@ -440,7 +440,7 @@ describe('API', function()
|
|||||||
eq({mode='n', blocking=false}, nvim("get_mode"))
|
eq({mode='n', blocking=false}, nvim("get_mode"))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('Does not cause heap buffer overflow with large output', function()
|
it('does not cause heap buffer overflow with large output', function()
|
||||||
eq(eval('string(range(1000000))'),
|
eq(eval('string(range(1000000))'),
|
||||||
nvim('command_output', 'echo range(1000000)'))
|
nvim('command_output', 'echo range(1000000)'))
|
||||||
end)
|
end)
|
||||||
@ -4411,8 +4411,6 @@ describe('API', function()
|
|||||||
eq('1', meths.cmd({cmd = 'echo', args = {true}}, {output = true}))
|
eq('1', meths.cmd({cmd = 'echo', args = {true}}, {output = true}))
|
||||||
end)
|
end)
|
||||||
describe('first argument as count', function()
|
describe('first argument as count', function()
|
||||||
before_each(clear)
|
|
||||||
|
|
||||||
it('works', function()
|
it('works', function()
|
||||||
command('vsplit | enew')
|
command('vsplit | enew')
|
||||||
meths.cmd({cmd = 'bdelete', args = {meths.get_current_buf()}}, {})
|
meths.cmd({cmd = 'bdelete', args = {meths.get_current_buf()}}, {})
|
||||||
|
@ -5,7 +5,7 @@ local exec_lua = helpers.exec_lua
|
|||||||
local clear = helpers.clear
|
local clear = helpers.clear
|
||||||
local feed = helpers.feed
|
local feed = helpers.feed
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
local is_os = helpers.is_os
|
local is_ci = helpers.is_ci
|
||||||
local poke_eventloop = helpers.poke_eventloop
|
local poke_eventloop = helpers.poke_eventloop
|
||||||
|
|
||||||
describe('vim.ui', function()
|
describe('vim.ui', function()
|
||||||
@ -134,7 +134,7 @@ describe('vim.ui', function()
|
|||||||
|
|
||||||
describe('open()', function()
|
describe('open()', function()
|
||||||
it('validation', function()
|
it('validation', function()
|
||||||
if not is_os('bsd') then
|
if is_ci('github') then
|
||||||
matches('vim.ui.open: command failed %(%d%): { "[^"]+", "non%-existent%-file" }',
|
matches('vim.ui.open: command failed %(%d%): { "[^"]+", "non%-existent%-file" }',
|
||||||
exec_lua[[local _, err = vim.ui.open('non-existent-file') ; return err]])
|
exec_lua[[local _, err = vim.ui.open('non-existent-file') ; return err]])
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user