>>>>"AM" == Alexey Mahotkin
<squadette(a)gmail.com> writes:
AM> Old value = (struct level_2_lookup_tree
*) 0x0
AM> New value = (struct level_2_lookup_tree *) 0x3
AM> init_mc_allocator () at mc-alloc.c:1734
AM> 1734 PLH_FIRST (plh) = 0;
AM> (gdb) bt
AM> #0 init_mc_allocator () at mc-alloc.c:1734
Seems that the struct mc_allocator_globals is somehow corrupted:
Looping over the free_heap_pages array and setting initial values
writes into the ptr_lookup_table. Both arrays are kept in the same
struct. Does the structure of mc_allocator_globals look similar to
this (before actually running XEmacs)?
(gdb) print mc_allocator_globals
$1 = {heap_size = 0,
heap_sections = {{real_start = 0x0, real_size = 0, start = 0x0,
n_pages = 0} <repeats 768 times>}, n_heap_sections = 0,
used_heap_pages = {{list_type = USED_LIST, size = 0, first = 0x0,
last = 0x0, mark_bit_free_list = 0x0, page_count = 0, used_cells = 0,
used_space = 0, total_cells = 0, total_space = 0} <repeats 256 times>},
unmanaged_heap_pages = {{list_type = USED_LIST, size = 0, first = 0x0,
last = 0x0, mark_bit_free_list = 0x0, page_count = 0, used_cells = 0,
used_space = 0, total_cells = 0, total_space = 0} <repeats 256 times>},
free_heap_pages = {{list_type = USED_LIST, size = 0, first = 0x0,
last = 0x0, mark_bit_free_list = 0x0, page_count = 0, used_cells = 0,
used_space = 0, total_cells = 0, total_space = 0} <repeats 60 times>},
ptr_lookup_table = {0x0 <repeats 2048 times>},
page_header_free_list = 0x0,
malloced_bytes = 0}
How does it look like when the segfault occurs?
--
Marcus