[M3devel] open array allocation problem?
Daniel Alejandro Benavides D.
dabenavidesd at yahoo.es
Wed Aug 17 22:34:19 CEST 2011
Hi all:
if there is soe assumpution like:
http://modula3.elegosoft.com/cm3/doc/help/gen_html/m3front/src/types/OpenArrayType.m3.html
Since it's an UNSAFE MODULE I guess enough sanity checks are not there or not enough for that to happen, (a type error or the message "CM3 restriction: open array elements must be byte-aligned")
So, does the collector assume that or it just ignore the "restriction", sort of lifting it or such. Or this is just a small commentary out of place?
Thanks in advance
--- El mié, 17/8/11, Tony Hosking <hosking at cs.purdue.edu> escribió:
> De: Tony Hosking <hosking at cs.purdue.edu>
> Asunto: Re: [M3devel] open array allocation problem?
> Para: "Dragiša Durić" <dragisha at m3w.org>
> CC: "m3devel" <m3devel at elegosoft.com>
> Fecha: miércoles, 17 de agosto, 2011 14:04
> 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