On Sat, Jun 12, 2004 at 11:32:16PM +0100, Nicholas Clark wrote:

> Er, oops. OS X wasn't uptodate. Test 8 crashes. Will the guard malloc I get
> further:
> 
> (gdb) print data[512]
> Cannot access memory at address 0xb30a3000
> (gdb) where
> #0  0x001b6004 in Parrot_FixedFloatArray_set_number_keyed_int 
> (interpreter=0xb000ec6c, pmc=0xb0654748, key=513, value=17.300000000000001) at 
> classes/fixedfloatarray.c:233
> #1  0x001b6118 in Parrot_FixedFloatArray_set_string_keyed_int 
> (interpreter=0xb000ec6c, pmc=0xb0654748, key=513, value=0xb003fc88) at 
> classes/fixedfloatarray.c:257

Found it. Fixed it:

diff -d -u -r1.1 fixedfloatarray.pmc
--- classes/fixedfloatarray.pmc 12 Jun 2004 15:54:00 -0000      1.1
+++ classes/fixedfloatarray.pmc 12 Jun 2004 22:49:05 -0000
@@ -290,7 +290,7 @@
         if (PMC_int_val(SELF) || size < 1)
             internal_exception(OUT_OF_BOUNDS, "FixedFloatArray: Can't resize!\n");
         PMC_int_val(SELF) = size;
-        PMC_data(SELF) = mem_sys_allocate(size * sizeof(INTVAL));
+        PMC_data(SELF) = mem_sys_allocate(size * sizeof(FLOATVAL));
         PObj_active_destroy_SET(SELF);
     }

Nicholas Clark

Reply via email to