* too many calls to alloc()/free()).
*/
new_start_len = needed_len + 50;
- if ((new_start = alloc(new_start_len)) == NULL)
+ if ((new_start = alloc_clear(new_start_len)) == NULL)
goto outofmem;
*new_start = NUL;
new_end = new_start;
if (needed_len > (int)new_start_len)
{
new_start_len = needed_len + 50;
- if ((p1 = alloc(new_start_len)) == NULL)
+ if ((p1 = alloc_clear(new_start_len)) == NULL)
{
vim_free(new_start);
goto outofmem;
" The following used to crash Vim
let opts = #{cmd: 'sh'}
let vim = GetVimProg()
- let result = 'X_crash1_1_result.txt'
+ let result = 'X_crash1_2_result.txt'
let buf = RunVimInTerminal('sh', opts)
\ ' ; echo "crash 4: [OK]" >> '.. result .. "\<cr>")
call TermWait(buf, 150)
+ let file = 'crash/poc_ex_substitute'
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
+ let args = printf(cmn_args, vim, file)
+ " just make sure it runs, we don't care about the resulting echo
+ call term_sendkeys(buf, args .. "\<cr>")
+ " There is no output generated in Github CI for the asan clang build.
+ " so just skip generating the ouput.
+ " call term_sendkeys(buf, args ..
+ " \ ' && echo "crash 5: [OK]" >> '.. result .. "\<cr>")
+ call TermWait(buf, 150)
+
" clean up
exe buf .. "bw!"