[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: seg fault in compact_small_strings()
From: |
Kim F. Storm |
Subject: |
Re: seg fault in compact_small_strings() |
Date: |
Fri, 29 Oct 2004 16:52:57 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
Stephen Eglen <address@hidden> writes:
> I'm using a recent version of CVS emacs (Oct 26) and notice it has
> been seg faulting maybe once/day;
Can you try to apply the following patch and see if it catches
an error sooner (your emacs will run marginally slower, but nothing serious).
*** alloc.c 19 Sep 2004 00:22:22 +0200 1.350
--- alloc.c 14 Oct 2004 23:58:12 +0200
***************
*** 1548,1553 ****
--- 1548,1571 ----
#endif /* GC_CHECK_STRING_BYTES */
+ #if 1
+ static void
+ check_string_free_list ()
+ {
+ struct Lisp_String *s;
+
+ /* Pop a Lisp_String off the free-list. */
+ s = string_free_list;
+ while (s != NULL)
+ {
+ if ((unsigned)s < 1024)
+ abort();
+ s = NEXT_FREE_LISP_STRING (s);
+ }
+ }
+ #else
+ #define check_string_free_list()
+ #endif
/* Return a new Lisp_String. */
***************
*** 1579,1584 ****
--- 1597,1604 ----
total_free_strings += STRING_BLOCK_SIZE;
}
+ check_string_free_list();
+
/* Pop a Lisp_String off the free-list. */
s = string_free_list;
string_free_list = NEXT_FREE_LISP_STRING (s);
***************
*** 1797,1805 ****
--- 1817,1829 ----
}
}
+ check_string_free_list();
+
string_blocks = live_blocks;
free_large_strings ();
compact_small_strings ();
+
+ check_string_free_list();
}
--
Kim F. Storm http://www.cua.dk