Patch 8.2.3207
Problem:    Vim9: crash when compiling string fails. (Yegappan Lakshmanan)
Solution:   Adjust the type stack length.
Files:      src/vim9compile.c, src/testdir/test_vim9_builtin.vim


*** ../vim-8.2.3206/src/vim9compile.c   2021-07-23 19:30:16.258412510 +0200
--- src/vim9compile.c   2021-07-24 13:11:50.446946362 +0200
***************
*** 3263,3268 ****
--- 3266,3272 ----
            semsg(_(e_trailing_arg), s);
        clear_instr_ga(&cctx->ctx_instr);
        cctx->ctx_instr = save_ga;
+       ++cctx->ctx_type_stack.ga_len;
        return FAIL;
      }
  
*** ../vim-8.2.3206/src/testdir/test_vim9_builtin.vim   2021-07-23 
20:37:52.022322433 +0200
--- src/testdir/test_vim9_builtin.vim   2021-07-24 13:17:06.586137240 +0200
***************
*** 2566,2573 ****
    END
    CheckScriptSuccess(lines)
    assert_equal('yes', g:caught)
- 
    unlet g:caught
    bwipe!
  enddef
  
--- 2566,2578 ----
    END
    CheckScriptSuccess(lines)
    assert_equal('yes', g:caught)
    unlet g:caught
+ 
+   lines =<< trim END
+       echo searchpair("a", "b", "c", "d", "1", "f")
+   END
+   CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:')
+ 
    bwipe!
  enddef
  
*** ../vim-8.2.3206/src/version.c       2021-07-23 20:37:52.022322433 +0200
--- src/version.c       2021-07-23 22:39:02.183407451 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3207,
  /**/

-- 
Your fault: core dumped

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202107241119.16OBJLHi782263%40masaka.moolenaar.net.

Raspunde prin e-mail lui