# HG changeset patch # User Chong Yidong # Date 1290386382 18000 # Node ID 0813efd37bf905e1b44ca276dcb220c251cf4235 # Parent e9a44a85f4272b0c9cd497a0d138b4ccb60d19cb Fix image cache marking bug (Bug#6301). * src/alloc.c (mark_terminals): Ensure that the image cache is marked even if the terminal object was marked earlier (Bug#6301). diff -r e9a44a85f427 -r 0813efd37bf9 src/ChangeLog --- a/src/ChangeLog Sun Nov 21 14:03:51 2010 -0500 +++ b/src/ChangeLog Sun Nov 21 19:39:42 2010 -0500 @@ -1,3 +1,8 @@ +2010-11-22 YAMAMOTO Mitsuharu + + * alloc.c (mark_terminals): Ensure that the image cache is marked + even if the terminal object was marked earlier (Bug#6301). + 2010-11-21 Chong Yidong * editfns.c (Fbyte_to_string): Signal an error arg is not a byte. diff -r e9a44a85f427 -r 0813efd37bf9 src/alloc.c --- a/src/alloc.c Sun Nov 21 14:03:51 2010 -0500 +++ b/src/alloc.c Sun Nov 21 19:39:42 2010 -0500 @@ -5771,13 +5771,14 @@ for (t = terminal_list; t; t = t->next_terminal) { eassert (t->name != NULL); +#ifdef HAVE_WINDOW_SYSTEM + /* If a terminal object is reachable from a stacpro'ed object, + it might have been marked already. Make sure the image cache + gets marked. */ + mark_image_cache (t->image_cache); +#endif /* HAVE_WINDOW_SYSTEM */ if (!VECTOR_MARKED_P (t)) - { -#ifdef HAVE_WINDOW_SYSTEM - mark_image_cache (t->image_cache); -#endif /* HAVE_WINDOW_SYSTEM */ - mark_vectorlike ((struct Lisp_Vector *)t); - } + mark_vectorlike ((struct Lisp_Vector *)t); } }