Hi,

The Vim9 LSP plugin (https://github.com/yegappan/lsp) has the
following line in the autoload/lsp/lspserver.vim file:

hover: function(Hover, [lspserver]),

If this line is changed to:

hover: function('Hover', [lspserver]),

then Vim crashes with the "E342: Out of memory!  (allocating
18446744073709551608 bytes)" error.

This is because the func_type_add_arg_types() function is called with
argcount set to -1. The valgrind traceback is below:

==109472== Argument 'size' of function malloc has a fishy (possibly
negative) value: -8
==109472==    at 0x4843839: malloc (in
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==109472==    by 0x13F453: lalloc (alloc.c:248)
==109472==    by 0x13F35A: alloc_clear (alloc.c:177)
==109472==    by 0x3D2273: func_type_add_arg_types (vim9type.c:308)
==109472==    by 0x3D296B: typval2type_int (vim9type.c:466)
==109472==    by 0x3D2B6D: typval2type (vim9type.c:518)
==109472==    by 0x3D268A: typval2type_int (vim9type.c:404)
==109472==    by 0x3D2B6D: typval2type (vim9type.c:518)
==109472==    by 0x3D2D2A: check_typval_type (vim9type.c:585)
==109472==    by 0x3BEF89: exec_instructions (vim9execute.c:4509)
==109472==    by 0x3C13BE: call_def_function (vim9execute.c:5188)
==109472==    by 0x39E4D8: call_user_func (userfunc.c:2575)

I am not able to come up with a small Vim9 script that reproduces this issue.

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%3D6VtApFpsF%3DBv2%2BRCd4Sr9AA5Hz3U_oygSJ_3-2_WFow%40mail.gmail.com.

Raspunde prin e-mail lui