Hi.
When giving list (or dict, some objects managed lifetime by copyID) to partial
to timer_start() 2nd argument, SEGV (or ABRT) may occur at timer fires.
[repro steps]
test.vim:
```
function Callback(lists, timer)
echo a:lists
endfunction
call timer_start(500, function('Callback', [['a']]))
call garbagecollect()
```
vim -Nu NONE -S test.vim
and vim finishes by SEGV or ABRT.
[cause]
The copyID of the object held by timer.tr_partial (['a'] of above) isn't be
updated during GC process, so GC releases it and it becomes dangling pointer.
[patch]
Add set_ref_in_timer() function:
https://gist.github.com/ichizok/b41ac7f68c3364a38bb07479bc9c7a49
Thank you.
- Ozaki Kiichi
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.