Problem: tests: Test_viminfo_len_overflow() fails
Solution: Catch E342 (Yasuhiro Matsumoto).
Test_viminfo_len_overflow tries to allocate ~4GB, which may throw E342
(out of memory) depending on the platform's memory allocation behavior.
This is an acceptable outcome since the test's purpose is to verify
that Vim does not crash on a crafted viminfo entry.
closes: #19891
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
\ '|<CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC',
\ '|<DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'], viminfo_file, 'b')
- " Should not crash or cause memory errors
- exe 'rviminfo! ' .. viminfo_file
+ " Should not crash or cause memory errors.
+ " E342 (out of memory) may be thrown depending on the platform's memory
+ " allocation behavior, which is an acceptable outcome.
+ try
+ exe 'rviminfo! ' .. viminfo_file
+ catch /E342/
+ endtry
let &viminfofile = _viminfofile
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 282,
/**/
281,
/**/