Hi
Vim sometimes uses EMSG(...) instead of IEMSG(...)
for internal errors.
Attached patch uses a few more IEMSG where it
looks appropriate. Probably more errors are internal
error, but it's hard to know which one without good
understanding of the code.
Using IEMSG(...) can help detecting more bugs when
fuzzing Vim. At last bugs fixed in patches 8.0.0124
and 8.0.0133 were found thanks to using IEMSG(...).
Regards
Dominique
--
--
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].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index fcca818..96cd232 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -1359,7 +1359,7 @@ nfa_regatom(void)
rc_did_emsg = TRUE;
return FAIL;
}
- EMSGN("INTERNAL: Unknown character class char: %ld", c);
+ IEMSGN("INTERNAL: Unknown character class char: %ld", c);
return FAIL;
}
#ifdef FEAT_MBYTE
@@ -4925,7 +4925,7 @@ check_char_class(int class, int c)
default:
/* should not be here :P */
- EMSGN(_(e_ill_char_class), class);
+ IEMSGN(_(e_ill_char_class), class);
return FAIL;
}
return FAIL;
@@ -7216,7 +7216,7 @@ nfa_regcomp(char_u *expr, int re_flags)
{
/* TODO: only give this error for debugging? */
if (post_ptr >= post_end)
- EMSGN("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
+ IEMSGN("Internal error: estimated max number of states insufficient: %ld", post_end - post_start);
goto fail; /* Cascaded (syntax?) error */
}