mirror of
https://github.com/neovim/neovim.git
synced 2025-11-30 14:10:50 +00:00
vim-patch:8.1.1579: dict and list could be GC'ed while displaying error
Problem: Dict and list could be GC'ed while displaying error in a timer.
(Yasuhiro Matsumoto)
Solution: Block garbage collection when executing a timer. Add
test_garbagecollect_soon(). Add "no_wait_return" to
test_override(). (closes vim/vim#4571)
adc6714aac
This commit is contained in:
@@ -406,7 +406,7 @@ end
|
||||
local alloc_logging_helpers = {
|
||||
list = function(l) return {func='calloc', args={1, ffi.sizeof('list_T')}, ret=void(l)} end,
|
||||
li = function(li) return {func='malloc', args={ffi.sizeof('listitem_T')}, ret=void(li)} end,
|
||||
dict = function(d) return {func='malloc', args={ffi.sizeof('dict_T')}, ret=void(d)} end,
|
||||
dict = function(d) return {func='calloc', args={1, ffi.sizeof('dict_T')}, ret=void(d)} end,
|
||||
di = function(di, size)
|
||||
size = alloc_len(size, function() return di.di_key end)
|
||||
return {func='malloc', args={ffi.offsetof('dictitem_T', 'di_key') + size + 1}, ret=void(di)}
|
||||
|
||||
Reference in New Issue
Block a user