[M3commit] CVS Update: cm3
Jay K
jay.krell at cornell.edu
Mon Aug 6 13:17:50 CEST 2012
Sorry, that isn't the right fix.
The problem can be better understood like so:
DepthArray = REF ARRAY OF RECORD n := 0 END;
dcount := NEW(DepthArray, 10);
FOR i := FIRST(dcount^) TO LAST(dcount^) DO
<* ASSERT dcount[i].n = 0 *>
END;
the assertion fails sometimes. I'll have to keep digging.
- Jay
From: jay.krell at cornell.edu
To: jkrell at elego.de; m3commit at elegosoft.com
Date: Mon, 6 Aug 2012 10:58:50 +0000
Subject: Re: [M3commit] CVS Update: cm3
Index: VBTRep.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-ui/ui/src/vbt/VBTRep.m3,v
retrieving revision 1.2
diff -u -w -r1.2 VBTRep.m3
--- VBTRep.m3 17 Mar 2008 03:46:14 -0000 1.2
+++ VBTRep.m3 6 Aug 2012 10:56:01 -0000
@@ -641,11 +641,13 @@
(* All d: dcount[d].n = # VBTs in list with depth at most d. *)
WITH v = NEW(REF ARRAY OF VBT.T, n) DO
FOR i := 0 TO n - 1 DO
+ IF list[i].depth > 0 THEN
v[dcount[list[i].depth - 1].n] := list[i].v;
INC(dcount[list[i].depth - 1].n);
(* All d: dcount[d-1].n = # VBTs in list with depth < d,
or with depth = d that have been copied into v. *)
END;
+ END;
(* v has all the VBTs in the list and is sorted by depth *)
FOR i := 0 TO n - 1 DO
IF Prop.Marked IN v[i].props THEN
> Date: Mon, 6 Aug 2012 12:58:03 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 12/08/06 12:58:03
>
> Modified files:
> cm3/m3-ui/ui/src/vbt/: VBTRep.m3
>
> Log message:
> avoid subscript out of range at line 644
> test case is starting up most gui apps on FreeBSD/x86 with gcc 4.7
> backend, remoting X to MacOSX 10.5; the distinguishing factor
> is probably the relative lack of windows or something funny
> with window layering on Mac -- i.e. depth = 0, resulting array
> index is -1 and that is invalid
>
> Trestle experts, please review and think over it more.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20120806/6871ecd5/attachment-0002.html>
More information about the M3commit
mailing list