Hi, On Sun, Nov 14, 2021 at 2:57 PM lacygoill <[email protected]> wrote:
> *Steps to reproduce* > > Run this shell command: > > vim -Nu NONE +'set previewpopup=height:10,width:60' +'vim9 pedit file' > > Vim crashes. > > *Expected behavior* > > Vim doesn't crash. > > *Operating system* > > Ubuntu 20.04.3 LTS > > *Version of Vim* > > 8.2 Included patches: 1-3595 > > *Logs and stack traces* > > - backtrace <https://github.com/vim/vim/files/7534861/backtrace.txt> > - asan log <https://github.com/vim/vim/files/7534860/asan.log> > > According to asan, there is a runtime error on line 735 in src/typval.c: > > typval.c:735:18: runtime error: member access within null pointer of type > 'struct typval_T' > > More precisely, on v_type: > > if (args[idx].v_type != VAR_STRING > ^----^ > > ------------------------------ > > The issue is specific to Vim9: > > vim -Nu NONE +'set previewpopup=height:10,width:60' +'vim9 pedit file' > ^--^ > > No crash if :pedit is run from the legacy context: > > vim -Nu NONE +'set previewpopup=height:10,width:60' +'legacy pedit file' > ^----^ > > ------------------------------ > > Regression introduced in patch 8.2.3229 > <https://github.com/vim/vim/releases/tag/v8.2.3229>. > > cc @yegappan <https://github.com/yegappan> via #8646 > <https://github.com/vim/vim/pull/8646> > > > Thanks for reporting the issue. The below patch will fix this issue: diff --git a/src/popupwin.c b/src/popupwin.c index d86c6c0ef..59bdf86b8 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -1851,13 +1851,13 @@ popup_create(typval_T *argvars, typval_T *rettv, create_ type_T type) int nr; int i; - if (in_vim9script() - && (check_for_string_or_number_or_list_arg(argvars, 0) == FAIL - || check_for_dict_arg(argvars, 1) == FAIL)) - return NULL; - if (argvars != NULL) { + if (in_vim9script() + && (check_for_string_or_number_or_list_arg(argvars, 0) == FAIL + || check_for_dict_arg(argvars, 1) == FAIL)) + return NULL; + // Check that arguments look OK. if (argvars[0].v_type == VAR_NUMBER) { Regards, Yegappan -- -- 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/CAAW7x7%3Di7CX3AdLXSOgRqK6kjFut34mkiayoAZLe%2Bz%3DBVE5Adg%40mail.gmail.com.
