Patch 8.2.2406

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 24, 2021, 3:31:20 PM1/24/21
to vim...@googlegroups.com

Patch 8.2.2406
Problem: Vim9: profiled :def function leaks memory.
Solution: Delete the profiled instructions.
Files: src/vim9compile.c


*** ../vim-8.2.2405/src/vim9compile.c 2021-01-24 20:51:56.784245253 +0100
--- src/vim9compile.c 2021-01-24 21:29:34.407122643 +0100
***************
*** 8837,8842 ****
--- 8837,8851 ----
VIM_CLEAR(dfunc->df_instr);
dfunc->df_instr = NULL;
}
+ #ifdef FEAT_PROFILE
+ if (dfunc->df_instr_prof != NULL)
+ {
+ for (idx = 0; idx < dfunc->df_instr_prof_count; ++idx)
+ delete_instr(dfunc->df_instr_prof + idx);
+ VIM_CLEAR(dfunc->df_instr_prof);
+ dfunc->df_instr_prof = NULL;
+ }
+ #endif

if (mark_deleted)
dfunc->df_deleted = TRUE;
*** ../vim-8.2.2405/src/version.c 2021-01-24 21:14:17.312631037 +0100
--- src/version.c 2021-01-24 21:30:15.282937484 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2406,
/**/

--
hundred-and-one symptoms of being an internet addict:
231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner
in the front doorway permanently so it always looks like you are
actually attempting to do something about that mess that has amassed
since you discovered the Internet.

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages