[M3devel] open array allocation problem?

Tony Hosking hosking at cs.purdue.edu
Wed Aug 17 21:04:41 CEST 2011


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
> 




More information about the M3devel mailing list