[M3devel] open array allocation problem?

Dragiša Durić dragisha at m3w.org
Thu Aug 18 09:48:26 CEST 2011


It happens with same code on three platforms and two versions... I can
send you my source to try to debug it - m3gdb frustrates me a lot these
days... 

Is it working at all? Or maybe on some of my platforms it is worth a
try? (m3gdb)

TIA,
dd

On Wed, 2011-08-17 at 15:04 -0400, Tony Hosking wrote:
> That suggests a corrupted heap of some kind.
> How could an open array ever have negative size?
> 
> 
> On Aug 17, 2011, at 1:05 PM, Dragiša Durić wrote:
> 
> > This one keeps happening, on 5.8.6-REL and 5.9.0 both, on LINUXLIBC6, AMD64_DARWIN and AMD64_LINUX. Not at same pint, but same place in RTCollector.
> > 
> > ***
> > *** runtime error:
> > ***    An enumeration or subrange value was out of range.
> > ***    file "../src/runtime/common/RTCollector.m3", line 330
> > ***
> > VAR
> >   res: INTEGER;
> >   sizes: UNTRACED REF INTEGER := h + ADRSIZE(Header) + ADRSIZE(ADDRESS);
> >                                                        (* ^ elt pointer*)
> > BEGIN
> >   res := 1;
> >   FOR i := 0 TO adef.nDimensions - 1 DO
> >     res := res * sizes^;
> >     INC(sizes, ADRSIZE(sizes^));
> >   END;
> >   res := res * adef.elementSize;
> >   res := RTMisc.Upper(res + adef.common.dataSize, BYTESIZE(Header));
> >   RETURN res; (* line 330 *)
> > END OpenArraySize;
> > 
> > OpenArraySize procedure type is CARDINAL, if it is important in any way.
> > 
> > TIA,
> > dd
> > 
> 

-- 
Dragiša Durić <dragisha at m3w.org>




More information about the M3devel mailing list