[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6301: 23.2.50; GC may lose Lisp objects in the image cache
From: |
YAMAMOTO Mitsuharu |
Subject: |
bug#6301: 23.2.50; GC may lose Lisp objects in the image cache |
Date: |
Sat, 29 May 2010 17:37:43 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
Currently, Fgarbage_collect calls mark_terminals after marking
staticpro'ed objects. Terminal objects need a special marking
strategy with respect to image cache, but if a terminal object is
reachable from some staticpro'ed object, then it is marked normally
(i.e., without considering image cache). As a result, Lisp objects in
the image cache might be collected though they should have been
marked.
The simplest way to fix this would be to call mark_terminals earlier.
Actually, the latest release of the Mac port includes the following
patch.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
=== modified file 'src/alloc.c'
*** src/alloc.c 2010-01-22 09:10:04 +0000
--- src/alloc.c 2010-05-29 07:58:30 +0000
*************** returns nil, because real GC can't be do
*** 5088,5093 ****
--- 5088,5097 ----
/* Mark all the special slots that serve as the roots of accessibility. */
+ /* Terminals need to be marked in a special way. But they can be
+ reachable from other roots and might be marked normally if
+ mark_terminals is called later. */
+ mark_terminals ();
for (i = 0; i < staticidx; i++)
mark_object (*staticvec[i]);
*************** returns nil, because real GC can't be do
*** 5096,5102 ****
mark_object (bind->symbol);
mark_object (bind->old_value);
}
- mark_terminals ();
mark_kboards ();
mark_ttys ();
--- 5100,5105 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#6301: 23.2.50; GC may lose Lisp objects in the image cache,
YAMAMOTO Mitsuharu <=