On Mon, 2005-03-28 at 17:41 -0800, chromatic wrote:

> It looks like the first element of interpreter->iglobals is wrong.

Obviously storing a null pointer in there doesn't help.  Here's a patch
that fixes things for me.

Now gdb says:

Breakpoint 1, Parrot_SArray_mark (interpreter=0x103ac920,
pmc=0x1056c550)
    at classes/sarray.c:269
269             switch (e->type) {
(gdb) p e
$1 = (HashEntry *) 0x10576a40
(gdb) p e->type
$2 = enum_hash_pmc
(gdb) p e->val
$3 = {_b = {_bufstart = 0x0, _buflen = 272522888}, _ptrs = {_struct_val
= 0x0, 
    _pmc_val = 0x103e5e88}, _i = {_int_val = 0, _int_val2 = 272522888}, 
  _num_val = 1.346441966662417e-315, _string_val = 0x0}

I'm curious why this worked anywhere else, though, unless there's
something about my platform that triggered an early DOD run.

-- c


Index: src/global_setup.c
===================================================================
RCS file: /cvs/public/parrot/src/global_setup.c,v
retrieving revision 1.58
diff -u -u -r1.58 global_setup.c
--- src/global_setup.c	9 Mar 2005 20:31:28 -0000	1.58
+++ src/global_setup.c	29 Mar 2005 01:56:45 -0000
@@ -50,7 +50,6 @@
     INTVAL i;
 
     PMC *iglobals;
-    PMC *classname_hash;
     PMC *self;
 
 #ifdef PARROT_HAS_PLATFORM_INIT_CODE
@@ -78,7 +77,7 @@
     for (i = 0; i < (INTVAL)IGLOBALS_SIZE; i++)
         VTABLE_set_pmc_keyed_int(interpreter, iglobals, i, NULL);
     VTABLE_set_pmc_keyed_int(interpreter, iglobals,
-            (INTVAL)IGLOBALS_CLASSNAME_HASH, classname_hash);
+            (INTVAL)IGLOBALS_CLASSNAME_HASH, interpreter->class_hash);
     self = pmc_new_noinit(interpreter, enum_class_ParrotInterpreter);
     PMC_data(self) = interpreter;
     VTABLE_set_pmc_keyed_int(interpreter, iglobals,

Reply via email to