|
1 To: [email protected] |
|
2 Subject: Patch 7.2.192 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
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 |
|
13 Sibilev) |
|
14 Files: src/eval.c |
|
15 |
|
16 |
|
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 |
|
19 *************** |
|
20 *** 6526,6532 **** |
|
21 |
|
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) |
|
26 { |
|
27 set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID + 1); |
|
28 --- 6526,6532 ---- |
|
29 |
|
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) |
|
34 { |
|
35 set_ref_in_ht(&fc->l_vars.dv_hashtab, copyID + 1); |
|
36 *************** |
|
37 *** 6564,6573 **** |
|
38 /* v: vars */ |
|
39 set_ref_in_ht(&vimvarht, copyID); |
|
40 |
|
41 ! /* Free lists and dictionaries that are not referenced. */ |
|
42 did_free = free_unref_items(copyID); |
|
43 |
|
44 ! /* check if any funccal can be freed now */ |
|
45 for (pfc = &previous_funccal; *pfc != NULL; ) |
|
46 { |
|
47 if (can_free_funccal(*pfc, copyID)) |
|
48 --- 6564,6577 ---- |
|
49 /* v: vars */ |
|
50 set_ref_in_ht(&vimvarht, copyID); |
|
51 |
|
52 ! /* |
|
53 ! * 2. Free lists and dictionaries that are not referenced. |
|
54 ! */ |
|
55 did_free = free_unref_items(copyID); |
|
56 |
|
57 ! /* |
|
58 ! * 3. Check if any funccal can be freed now. |
|
59 ! */ |
|
60 for (pfc = &previous_funccal; *pfc != NULL; ) |
|
61 { |
|
62 if (can_free_funccal(*pfc, copyID)) |
|
63 *************** |
|
64 *** 9286,9292 **** |
|
65 if (noref < 0 || noref > 1) |
|
66 EMSG(_(e_invarg)); |
|
67 else |
|
68 ! item_copy(&argvars[0], rettv, TRUE, noref == 0 ? ++current_copyID : 0); |
|
69 } |
|
70 |
|
71 /* |
|
72 --- 9290,9299 ---- |
|
73 if (noref < 0 || noref > 1) |
|
74 EMSG(_(e_invarg)); |
|
75 else |
|
76 ! { |
|
77 ! current_copyID += COPYID_INC; |
|
78 ! item_copy(&argvars[0], rettv, TRUE, noref == 0 ? current_copyID : 0); |
|
79 ! } |
|
80 } |
|
81 |
|
82 /* |
|
83 *************** |
|
84 *** 18966,18972 **** |
|
85 char_u *s; |
|
86 char_u numbuf[NUMBUFLEN]; |
|
87 |
|
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); |
|
91 vim_free(tofree); |
|
92 --- 18973,18980 ---- |
|
93 char_u *s; |
|
94 char_u numbuf[NUMBUFLEN]; |
|
95 |
|
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); |
|
100 vim_free(tofree); |
|
101 *************** |
|
102 *** 19401,19407 **** |
|
103 } |
|
104 else if (eap->cmdidx == CMD_echo) |
|
105 msg_puts_attr((char_u *)" ", echo_attr); |
|
106 ! p = echo_string(&rettv, &tofree, numbuf, ++current_copyID); |
|
107 if (p != NULL) |
|
108 for ( ; *p != NUL && !got_int; ++p) |
|
109 { |
|
110 --- 19409,19416 ---- |
|
111 } |
|
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); |
|
116 if (p != NULL) |
|
117 for ( ; *p != NUL && !got_int; ++p) |
|
118 { |
|
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 |
|
121 *************** |
|
122 *** 678,679 **** |
|
123 --- 678,681 ---- |
|
124 { /* Add new patch number below this line */ |
|
125 + /**/ |
|
126 + 192, |
|
127 /**/ |
|
128 |
|
129 -- |
|
130 Imagine a world without hypothetical situations. |
|
131 |
|
132 /// Bram Moolenaar -- [email protected] -- 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 /// |