aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_eval_stuff.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-27 11:40:38 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-27 12:47:44 +0800
commit807c6bb909806b5abc3e46a9677bedfdddf2a7f0 (patch)
tree24e2e8d8ecc6200fe2c66d4b94701a8f29053d88 /src/nvim/testdir/test_eval_stuff.vim
parentb793395019333127e085997b7ced4ea02053697e (diff)
downloadrneovim-807c6bb909806b5abc3e46a9677bedfdddf2a7f0.tar.gz
rneovim-807c6bb909806b5abc3e46a9677bedfdddf2a7f0.tar.bz2
rneovim-807c6bb909806b5abc3e46a9677bedfdddf2a7f0.zip
vim-patch:8.2.4206: condition with many "(" causes a crash
Problem: Condition with many "(" causes a crash. Solution: Limit recursion to 1000. https://github.com/vim/vim/commit/fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir/test_eval_stuff.vim')
-rw-r--r--src/nvim/testdir/test_eval_stuff.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim
index 5c60b64c22..851048ec5b 100644
--- a/src/nvim/testdir/test_eval_stuff.vim
+++ b/src/nvim/testdir/test_eval_stuff.vim
@@ -367,6 +367,11 @@ func Test_curly_assignment()
unlet g:gvar
endfunc
+func Test_deep_recursion()
+ " this was running out of stack
+ call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')
+endfunc
+
" K_SPECIAL in the modified character used be escaped, which causes
" double-escaping with feedkeys() or as the return value of an <expr> mapping,
" and doesn't match what getchar() returns,