Patch 8.2.0937

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 9, 2020, 11:31:00 AM6/9/20
to vim...@googlegroups.com

Patch 8.2.0937
Problem: Asan failure in the flatten() test.
Solution: Free the flattened list.
Files: src/list.c


*** ../vim-8.2.0936/src/list.c 2020-06-08 20:50:23.432250668 +0200
--- src/list.c 2020-06-09 17:19:39.817474717 +0200
***************
*** 739,744 ****
--- 739,745 ----
list_flatten(list_T *list, long maxdepth)
{
listitem_T *item;
+ listitem_T *tofree;
int n;

if (maxdepth == 0)
***************
*** 760,770 ****
--- 761,774 ----
vimlist_remove(list, item, item);
if (list_extend(list, item->li_tv.vval.v_list, next) == FAIL)
return FAIL;
+ clear_tv(&item->li_tv);
+ tofree = item;

if (item->li_prev == NULL)
item = list->lv_first;
else
item = item->li_prev->li_next;
+ list_free_item(list, tofree);

if (++n >= maxdepth)
{
*** ../vim-8.2.0936/src/version.c 2020-06-09 15:57:32.929019414 +0200
--- src/version.c 2020-06-09 17:29:39.007718745 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 937,
/**/

--
Q: Why do ducks have flat feet?
A: To stamp out forest fires.

Q: Why do elephants have flat feet?
A: To stamp out flaming ducks.

/// 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