How to reproduce:
- start Vim and set 'hi' option to huge value.
$ vim -N -u NONE -c "set history=100000000"
- Input colon.
:
Occurred pattern #1
- OS get stuck (Verrry slow response)
Occurred pattern #2
- get 'E342'
E342: Out of memory! (allocating 1600000000 bytes)
- And Vim can not terminated by ':q'.
(I know terminated ZQ or ZZ)
Investigation for #1
- `:` typed after 'hi'option changed, call init_history().
This function is call lalloc() by huge value.
(p_hi * 16 = 1600000000)
I think we should have an upper limit to 'hi'. (10000 in Patch#1)
Investigation for #2
- If an error occurs after I press the colon, The command line
is not interpreted in the usual way.
[ea.skip ... ex_docmd.c:1972]
So, if get an error in init_history() and command-line
character is `:`, Then I clear the did_emsg.
I attached two patches.
Please check these.
Thank you for reading my crazy English :-)
--
Best regards,
Hirohito Higashi