aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-05-17 12:08:02 +0000
committerKim F. Storm2004-05-17 12:08:02 +0000
commitd2db1c32fa78470ed55f7cdd2ddeb1adfb070404 (patch)
treecfe67f507d86c72e0f4636d1d4cbc25cc6dbc277 /src
parent54b53ba7a303e93e56c0e07f9160040a79c56f22 (diff)
downloademacs-d2db1c32fa78470ed55f7cdd2ddeb1adfb070404.tar.gz
emacs-d2db1c32fa78470ed55f7cdd2ddeb1adfb070404.zip
(mark_object): Ignore Lisp_Misc_Free objects.
Such objects may be freed markers which still exist on an undo list.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index b5a96953adb..dd4823bd9e3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -844,7 +844,7 @@ lisp_align_free (block)
844 free_ablock = ablock; 844 free_ablock = ablock;
845 /* Update busy count. */ 845 /* Update busy count. */
846 ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY (abase)); 846 ABLOCKS_BUSY (abase) = (struct ablocks *) (-2 + (long) ABLOCKS_BUSY (abase));
847 847
848 if (2 > (long) ABLOCKS_BUSY (abase)) 848 if (2 > (long) ABLOCKS_BUSY (abase))
849 { /* All the blocks are free. */ 849 { /* All the blocks are free. */
850 int i = 0, aligned = (long) ABLOCKS_BUSY (abase); 850 int i = 0, aligned = (long) ABLOCKS_BUSY (abase);
@@ -4976,6 +4976,15 @@ mark_object (arg)
4976 break; 4976 break;
4977 4977
4978 case Lisp_Misc: 4978 case Lisp_Misc:
4979 if (XMISCTYPE (obj) == Lisp_Misc_Free)
4980 {
4981 /* This is (probably) a freed marker which may still exist on
4982 a buffer undo list, so accept it here. */
4983 /* If we reuse the marker, and it still exists on the undo
4984 list, and we do undo, behaviour is unpredictable --
4985 but at least we don't crash here. KFS 2004-05-17 */
4986 break;
4987 }
4979 CHECK_ALLOCATED_AND_LIVE (live_misc_p); 4988 CHECK_ALLOCATED_AND_LIVE (live_misc_p);
4980 if (XMARKER (obj)->gcmarkbit) 4989 if (XMARKER (obj)->gcmarkbit)
4981 break; 4990 break;