Patch 9.0.0322
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any.
Files: src/quickfix.c, src/testdir/test_quickfix.vim
*** ../vim-9.0.0321/src/quickfix.c 2022-08-27 20:59:51.849354123 +0100
--- src/quickfix.c 2022-08-29 20:42:15.096315367 +0100
***************
*** 4761,4767 ****
}
// Check if there is anything to display
! if (qfl != NULL)
{
char_u dirname[MAXPATHL];
int invalid_val = FALSE;
--- 4761,4767 ----
}
// Check if there is anything to display
! if (qfl != NULL && qfl->qf_start != NULL)
{
char_u dirname[MAXPATHL];
int invalid_val = FALSE;
*** ../vim-9.0.0321/src/testdir/test_quickfix.vim 2022-08-27
20:59:51.849354123 +0100
--- src/testdir/test_quickfix.vim 2022-08-29 20:43:15.960410624 +0100
***************
*** 4107,4112 ****
--- 4107,4128 ----
endif
endfunc
+ func Test_empty_list_quickfixtextfunc()
+ " This was crashing. Can only reproduce by running it in a separate Vim
+ " instance.
+ let lines =<< trim END
+ func s:Func(o)
+ cgetexpr '0'
+ endfunc
+ cope
+ let &quickfixtextfunc = 's:Func'
+ cgetfile [ex
+ END
+ call writefile(lines, 'Xquickfixtextfunc')
+ call RunVim([], [], '-e -s -S Xquickfixtextfunc -c qa')
+ call delete('Xquickfixtextfunc')
+ endfunc
+
func Test_getqflist()
call Xgetlist_empty_tests('c')
call Xgetlist_empty_tests('l')
*** ../vim-9.0.0321/src/version.c 2022-08-29 18:16:11.578636822 +0100
--- src/version.c 2022-08-29 20:26:26.552189456 +0100
***************
*** 709,710 ****
--- 709,712 ----
{ /* Add new patch number below this line */
+ /**/
+ 322,
/**/
--
How come wrong numbers are never busy?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220829194545.BD01A1C07CD%40moolenaar.net.