APPROVE COMMIT 21.5
NOTE: This patch has been committed.
>>>>>"AM" == Alexey Mahotkin <squadette(a)gmail.com> writes:
AM> /home/alexm/src/xemacs-21.5.21/src/../lisp/'.  Program terminated
AM> with signal 11, Segmentation fault.  #0 0x081b1e8f in
AM> set_lookup_table (ptr=0xb7a4a800, ph=0x83fb6b0) at mc-alloc.c:531
AM> 531 LEVEL2 (l2, L2_INDEX (ptr)) = ph;
The cause of the problem is that the lookup table is not correctly
initialized.  The segfault on x86-64 systems reported by Mike Fabian
may also be caused by this bug.
Alexey, could you please test if this patch really fixes your build
and report back?  Thank you!
src/ChangeLog addition:
2005-09-14  Marcus Crestani  <crestani(a)xemacs.org>
	* mc-alloc.c (set_lookup_table): Adjust parameter to other memset
	calls.
	* mc-alloc.c (init_mc_allocator): Zero global allocator structure.
manual-mc-xemacs-21.5 source patch:
Diff command:   cvs -q diff -u
Files affected: src/mc-alloc.c
Index: src/mc-alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mc-alloc.c,v
retrieving revision 1.3
diff -u -r1.3 mc-alloc.c
--- src/mc-alloc.c	15 May 2005 16:38:13 -0000	1.3
+++ src/mc-alloc.c	14 Sep 2005 13:26:07 -0000
@@ -521,7 +521,7 @@
       MC_MALLOCED_BYTES += 
 	malloced_storage_size (0, sizeof (level_2_lookup_tree), 0);
 #endif
-      memset (l2, 0, sizeof (level_2_lookup_tree));
+      memset (l2, '\0', sizeof (level_2_lookup_tree));
 #ifdef USE_HASH_TABLE
       LEVEL2_HASH_LINK (l2) = PTR_LOOKUP_TABLE (l1_index);
 #endif
@@ -1689,6 +1689,8 @@
 init_mc_allocator (void)
 {
   int i;
+
+  memset (&mc_allocator_globals, '\0', sizeof (mc_allocator_globals_type));
 
   for (i = 0; i < N_USED_PAGE_LISTS; i++)
     {
-- 
Marcus