Patch 8.2.2163
Problem: Crash when discarded exception is the current exception.
Solution: Compare the execption with current_exception. (closes #7499)
Files: src/ex_eval.c
*** ../vim-8.2.2162/src/ex_eval.c 2020-10-20 14:25:03.930883006 +0200
--- src/ex_eval.c 2020-12-19 17:51:17.483485035 +0100
***************
*** 606,611 ****
--- 606,613 ----
{
char_u *saved_IObuff;
+ if (current_exception == excp)
+ current_exception = NULL;
if (excp == NULL)
{
internal_error("discard_exception()");
***************
*** 654,663 ****
discard_current_exception(void)
{
if (current_exception != NULL)
- {
discard_exception(current_exception, FALSE);
- current_exception = NULL;
- }
did_throw = FALSE;
need_rethrow = FALSE;
}
--- 656,662 ----
***************
*** 2284,2291 ****
// Cancel the pending exception. This is in the
// finally clause, so that the stack of the
// caught exceptions is not involved.
! discard_exception((except_T *)
! cstack->cs_exception[idx],
FALSE);
}
else
--- 2283,2290 ----
// Cancel the pending exception. This is in the
// finally clause, so that the stack of the
// caught exceptions is not involved.
! discard_exception(
! (except_T *)cstack->cs_exception[idx],
FALSE);
}
else
*** ../vim-8.2.2162/src/version.c 2020-12-19 16:30:39.443810119 +0100
--- src/version.c 2020-12-19 17:52:04.303347943 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2163,
/**/
--
Back off man, I'm a scientist.
-- Peter, Ghostbusters
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///