all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6301: 23.2.50; GC may lose Lisp objects in the image cache
@ 2010-05-29  8:37 YAMAMOTO Mitsuharu
  2010-10-11  5:47 ` YAMAMOTO Mitsuharu
  2010-11-22  0:45 ` Chong Yidong
  0 siblings, 2 replies; 5+ messages in thread
From: YAMAMOTO Mitsuharu @ 2010-05-29  8:37 UTC (permalink / raw)
  To: 6301

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-22  0:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29  8:37 bug#6301: 23.2.50; GC may lose Lisp objects in the image cache YAMAMOTO Mitsuharu
2010-10-11  5:47 ` YAMAMOTO Mitsuharu
2010-10-11 17:21   ` Andreas Schwab
2010-10-12  0:20     ` YAMAMOTO Mitsuharu
2010-11-22  0:45 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.