To: vim_dev@googlegroups.com Subject: Patch 8.2.0494 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0494 Problem: Vim9: asan error. Solution: Only get the type when there is one. Files: src/vim9compile.c *** ../vim-8.2.0493/src/vim9compile.c 2020-04-01 22:10:56.428201257 +0200 --- src/vim9compile.c 2020-04-01 22:33:04.778968343 +0200 *************** *** 3767,3773 **** goto theend; stack = &cctx->ctx_type_stack; ! stacktype = ((type_T **)stack->ga_data)[stack->ga_len - 1]; if (idx >= 0 && (is_decl || !has_type)) { lvar = ((lvar_T *)cctx->ctx_locals.ga_data) + idx; --- 3767,3774 ---- goto theend; stack = &cctx->ctx_type_stack; ! stacktype = stack->ga_len == 0 ? &t_void ! : ((type_T **)stack->ga_data)[stack->ga_len - 1]; if (idx >= 0 && (is_decl || !has_type)) { lvar = ((lvar_T *)cctx->ctx_locals.ga_data) + idx; *** ../vim-8.2.0493/src/version.c 2020-04-01 22:10:56.436201223 +0200 --- src/version.c 2020-04-01 22:33:46.082809832 +0200 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 494, /**/ -- An indication you must be a manager: You give constructive feedback to your dog. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///