Patch 8.0.0331
Problem: Restoring help snapshot accesses freed memory. (Dominique Pelle)
Solution: Don't restore a snapshot when the window closes.
Files: src/window.c, src/Makefile, src/testdir/Make_all.mak,
src/testdir/test_help.vim
*** ../vim-8.0.0330/src/window.c 2017-02-05 15:10:47.743484042 +0100
--- src/window.c 2017-02-17 12:01:00.677367540 +0100
***************
*** 6551,6557 ****
/*
* Check if frames "sn" and "fr" have the same layout, same following frames
! * and same children.
*/
static int
check_snapshot_rec(frame_T *sn, frame_T *fr)
--- 6551,6557 ----
/*
* Check if frames "sn" and "fr" have the same layout, same following frames
! * and same children. And the window pointer is valid.
*/
static int
check_snapshot_rec(frame_T *sn, frame_T *fr)
***************
*** 6562,6568 ****
|| (sn->fr_next != NULL
&& check_snapshot_rec(sn->fr_next, fr->fr_next) == FAIL)
|| (sn->fr_child != NULL
! && check_snapshot_rec(sn->fr_child, fr->fr_child) == FAIL))
return FAIL;
return OK;
}
--- 6562,6569 ----
|| (sn->fr_next != NULL
&& check_snapshot_rec(sn->fr_next, fr->fr_next) == FAIL)
|| (sn->fr_child != NULL
! && check_snapshot_rec(sn->fr_child, fr->fr_child) == FAIL)
! || !win_valid(sn->fr_win))
return FAIL;
return OK;
}
*** ../vim-8.0.0330/src/Makefile 2017-02-05 21:14:26.743355267 +0100
--- src/Makefile 2017-02-17 11:51:41.121426165 +0100
***************
*** 2132,2137 ****
--- 2132,2138 ----
test_goto \
test_gui \
test_hardcopy \
+ test_help \
test_help_tagjump \
test_hide \
test_history \
*** ../vim-8.0.0330/src/testdir/Make_all.mak 2017-02-05 21:14:26.743355267
+0100
--- src/testdir/Make_all.mak 2017-02-17 11:51:59.109295603 +0100
***************
*** 154,159 ****
--- 154,160 ----
test_gn.res \
test_gui.res \
test_hardcopy.res \
+ test_help.res \
test_hide.res \
test_history.res \
test_hlsearch.res \
*** ../vim-8.0.0330/src/testdir/test_help.vim 2017-02-17 12:04:13.075973270
+0100
--- src/testdir/test_help.vim 2017-02-17 11:49:54.030203593 +0100
***************
*** 0 ****
--- 1,10 ----
+ " Tests for :help
+
+ func Test_help_restore_snapshot()
+ help
+ set buftype=
+ help
+ edit x
+ help
+ helpclose
+ endfunc
*** ../vim-8.0.0330/src/version.c 2017-02-17 11:39:54.994547761 +0100
--- src/version.c 2017-02-17 12:02:59.864503746 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 331,
/**/
--
Westheimer's Discovery:
A couple of months in the laboratory can
frequently save a couple of hours in the library.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
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].
For more options, visit https://groups.google.com/d/optout.