patch 8.2.0098: exe stack length can be wrong without being detected
Problem: Exe stack length can be wrong without being detected.
Solution: Add a check when ABORT_ON_INTERNAL_ERROR is defined.
diff --git a/src/buffer.c b/src/buffer.c
index 0a68d48..f56ff0b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5287,6 +5287,7 @@
#ifdef FEAT_EVAL
sctx_T save_current_sctx;
#endif
+ ESTACK_CHECK_DECLARATION
prev = -1;
for (s = ml_get(lnum); *s != NUL; ++s)
@@ -5330,6 +5331,7 @@
// prepare for emsg()
estack_push(ETYPE_MODELINE, (char_u *)"modelines", lnum);
+ ESTACK_CHECK_SETUP
end = FALSE;
while (end == FALSE)
@@ -5390,6 +5392,7 @@
s = e + 1; // advance to next part
}
+ ESTACK_CHECK_NOW
estack_pop();
vim_free(linecopy);
}