4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
10 Patch 7.2.192 (after 7.2.188)
11 Problem: Still a crash in the garbage collector for a very rare situation.
12 Solution: Make sure current_copyID is always incremented correctly. (Kent
17 *** ../vim-7.2.191/src/eval.c 2009-05-26 22:58:43.000000000 +0200
18 --- src/eval.c 2009-05-29 21:13:47.000000000 +0200
22 /* Don't free variables in the previous_funccal list unless they are only
23 * referenced through previous_funccal. This must be first, because if
24 ! * the item is referenced elsewhere it must not be freed. */
25 for (fc = previous_funccal; fc != NULL; fc = fc->caller)
27 set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID + 1);
30 /* Don't free variables in the previous_funccal list unless they are only
31 * referenced through previous_funccal. This must be first, because if
32 ! * the item is referenced elsewhere the funccal must not be freed. */
33 for (fc = previous_funccal; fc != NULL; fc = fc->caller)
35 set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID + 1);
39 set_ref_in_ht(&vimvarht, copyID);
41 ! /* Free lists and dictionaries that are not referenced. */
42 did_free = free_unref_items(copyID);
44 ! /* check if any funccal can be freed now */
45 for (pfc = &previous_funccal; *pfc != NULL; )
47 if (can_free_funccal(*pfc, copyID))
50 set_ref_in_ht(&vimvarht, copyID);
53 ! * 2. Free lists and dictionaries that are not referenced.
55 did_free = free_unref_items(copyID);
58 ! * 3. Check if any funccal can be freed now.
60 for (pfc = &previous_funccal; *pfc != NULL; )
62 if (can_free_funccal(*pfc, copyID))
65 if (noref < 0 || noref > 1)
68 ! item_copy(&argvars[0], rettv, TRUE, noref == 0 ? ++current_copyID : 0);
73 if (noref < 0 || noref > 1)
77 ! current_copyID += COPYID_INC;
78 ! item_copy(&argvars[0], rettv, TRUE, noref == 0 ? current_copyID : 0);
86 char_u numbuf[NUMBUFLEN];
88 ! s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
89 list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
90 s == NULL ? (char_u *)"" : s, first);
94 char_u numbuf[NUMBUFLEN];
96 ! current_copyID += COPYID_INC;
97 ! s = echo_string(&v->di_tv, &tofree, numbuf, current_copyID);
98 list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
99 s == NULL ? (char_u *)"" : s, first);
104 else if (eap->cmdidx == CMD_echo)
105 msg_puts_attr((char_u *)" ", echo_attr);
106 ! p = echo_string(&rettv, &tofree, numbuf, ++current_copyID);
108 for ( ; *p != NUL && !got_int; ++p)
112 else if (eap->cmdidx == CMD_echo)
113 msg_puts_attr((char_u *)" ", echo_attr);
114 ! current_copyID += COPYID_INC;
115 ! p = echo_string(&rettv, &tofree, numbuf, current_copyID);
117 for ( ; *p != NUL && !got_int; ++p)
119 *** ../vim-7.2.191/src/version.c 2009-05-26 22:58:43.000000000 +0200
120 --- src/version.c 2009-06-03 13:21:20.000000000 +0200
124 { /* Add new patch number below this line */
130 Imagine a world without hypothetical situations.
132 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
133 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
134 \\\ download, build and distribute -- http://www.A-A-P.org ///
135 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///