[M3devel] open array allocation problem?
Dragiša Durić
dragisha at m3w.org
Wed Aug 17 19:05:55 CEST 2011
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