msgpack_rpc: Also make msgpack_from_*/msgpack_to_* functions not recur

This removes some stack overflows in new test regarding deeply nested variables.
Now in place of crashing vim_to_object/msgpack_rpc_from_object/etc it crashes
clear_tv with stack overflow.
This commit is contained in:
ZyX
2016-04-24 20:51:23 +03:00
parent 6b06bdafa2
commit 90b8cf133e
3 changed files with 282 additions and 118 deletions

View File

@@ -40,7 +40,7 @@ describe('notify', function()
it('does not crash for deeply nested variable', function()
meths.set_var('l', {})
local nest_level = 100000
local nest_level = 1000
meths.command(('call map(range(%u), "extend(g:, {\'l\': [g:l]})")'):format(nest_level))
local ret = {}
for i = 1, nest_level do