From 90b8cf133e2bd7b7aa59b3954e54ba7ebd118071 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 24 Apr 2016 20:51:23 +0300 Subject: 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. --- test/functional/api/server_notifications_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/api') diff --git a/test/functional/api/server_notifications_spec.lua b/test/functional/api/server_notifications_spec.lua index 110bc6cbf1..23f16ea1f5 100644 --- a/test/functional/api/server_notifications_spec.lua +++ b/test/functional/api/server_notifications_spec.lua @@ -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 -- cgit