From rodney.bates at wichita.edu Thu Dec 21 03:04:14 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Wed, 20 Dec 2006 20:04:14 -0600 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code Message-ID: <4589EB9E.5090109@wichita.edu> Somewhere, a few months back, I accidentally came across some Quake code that tested whether it was being interpreted by the pm3 or cm3 version of Quake. I carefully made a note about it, but now that I need it, I can't find it. As I remember, it tested whether a certain variable was defined, that is predefined by one of the versions and not the other. Does anybody happen to remember, without having to do any digging, where such Quake code might be or what the mysterious variable is? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From wagner at plane.elego.de Thu Dec 21 08:24:26 2006 From: wagner at plane.elego.de (Olaf Wagner) Date: Thu, 21 Dec 2006 08:24:26 +0100 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code In-Reply-To: <4589EB9E.5090109@wichita.edu> References: <4589EB9E.5090109@wichita.edu> Message-ID: <20061221072426.GA26144@elegosoft.com> On Wed, Dec 20, 2006 at 08:04:14PM -0600, Rodney M. Bates wrote: > Somewhere, a few months back, I accidentally came across some Quake > code that tested whether it was being interpreted by the pm3 or cm3 > version of Quake. I carefully made a note about it, but now that I > need it, I can't find it. As I remember, it tested whether a certain > variable was defined, that is predefined by one of the versions and > not the other. > > Does anybody happen to remember, without having to do any digging, > where such Quake code might be or what the mysterious variable is? You probably think of this code in cvsup/quake/cvsup.quake: % Determine whether we are using the PM3 release of Modula-3. if not defined("PM3") % The procedure "build_standalone" exists only in SRC Modula-3. if not defined("build_standalone") PM3 = "T" end end Since many version, the cm3 builder also defines the following variables, which may be more appropriate for the purpose: EVAL defs.put("CM3_RELEASE", "d5.4.0"); (* readable release version *) EVAL defs.put("CM3_VERSION", "050400"); (* version as number *) EVAL defs.put("CM3_CREATED", "2006-08-01"); (* date of last change *) Olaf -- elego Software Solutions GmbH HRB 77719 Olaf Wagner E-Mail: wagner(at)elego.de Ohmstra?e 9 Tel: +49 30 40 04 19 29 10179 Berlin Fax: +49 30 23 45 86 95 Cranachstra?e 7 Tel: +49 30 85 58 01 81 12157 Berlin Fax: +49 30 85 58 01 88 ------------------> WWW: http://www.elego-software-solutions.com From jayk123 at hotmail.com Sat Dec 30 04:00:11 2006 From: jayk123 at hotmail.com (j k) Date: Sat, 30 Dec 2006 03:00:11 +0000 Subject: [M3devel] bootstrapping cm3 from DEC SRC 3.6/pm3? Message-ID: An HTML attachment was scrubbed... URL: From rodney.bates at wichita.edu Sun Dec 31 01:41:07 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Sat, 30 Dec 2006 18:41:07 -0600 Subject: [M3devel] A GC/compiler/Pickle interaction bug Message-ID: <45970723.5070102@wichita.edu> I tracked down a bug unpickling to the following. When executing in ConvertPacking.Read, at ConvertPacking.m3:327, this code: WITH ref = LOOPHOLE(dest, UNTRACED REF REFANY) DO ref^ := v.readRef(nelem.refType); END; has a compiler-generated call on RTCollector.CheckStoreTraced(ref). CheckStoreTraced expects ref to be a normal reference to an object, computes the address of its header (4 bytes less), and sets the dirty bit. But ConvertPacking is reading in to a field of a recently created object that is not first in the object. It computes ref to point to the field, and CheckStoreTraced actually steps on the previous real field instead of the header. It looks like the actions of CheckStoreTraced are needed, but I don't right off hand see how to recode Convert to fix this. It's use of ref can't be moved. Presumably, there could be other unsafe code elsewhere using the same technique to store data. Does the compiler need a different criterion on when to generate the call on CheckStoreTraced? ref is an UNTRACED REF here, but it still is pointing inside a traced object. Maybe people who modify objects in this way need to explicitly call CheckStoreTraced? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From jayk123 at hotmail.com Sun Dec 31 13:58:19 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 12:58:19 +0000 Subject: [M3devel] m3commit not working Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:05:07 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:05:07 +0000 Subject: [M3devel] configuring full paths vs. dependence on %PATH% / %LIB% / %INCLUDE%? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:14:08 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:14:08 +0000 Subject: [M3devel] hosts/targets/toolsets? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:22:54 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:22:54 +0000 Subject: [M3devel] inaccuracy of NT386 and Win32 names? Message-ID: An HTML attachment was scrubbed... URL: From rodney.bates at wichita.edu Thu Dec 21 03:04:14 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Wed, 20 Dec 2006 20:04:14 -0600 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code Message-ID: <4589EB9E.5090109@wichita.edu> Somewhere, a few months back, I accidentally came across some Quake code that tested whether it was being interpreted by the pm3 or cm3 version of Quake. I carefully made a note about it, but now that I need it, I can't find it. As I remember, it tested whether a certain variable was defined, that is predefined by one of the versions and not the other. Does anybody happen to remember, without having to do any digging, where such Quake code might be or what the mysterious variable is? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From wagner at plane.elego.de Thu Dec 21 08:24:26 2006 From: wagner at plane.elego.de (Olaf Wagner) Date: Thu, 21 Dec 2006 08:24:26 +0100 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code In-Reply-To: <4589EB9E.5090109@wichita.edu> References: <4589EB9E.5090109@wichita.edu> Message-ID: <20061221072426.GA26144@elegosoft.com> On Wed, Dec 20, 2006 at 08:04:14PM -0600, Rodney M. Bates wrote: > Somewhere, a few months back, I accidentally came across some Quake > code that tested whether it was being interpreted by the pm3 or cm3 > version of Quake. I carefully made a note about it, but now that I > need it, I can't find it. As I remember, it tested whether a certain > variable was defined, that is predefined by one of the versions and > not the other. > > Does anybody happen to remember, without having to do any digging, > where such Quake code might be or what the mysterious variable is? You probably think of this code in cvsup/quake/cvsup.quake: % Determine whether we are using the PM3 release of Modula-3. if not defined("PM3") % The procedure "build_standalone" exists only in SRC Modula-3. if not defined("build_standalone") PM3 = "T" end end Since many version, the cm3 builder also defines the following variables, which may be more appropriate for the purpose: EVAL defs.put("CM3_RELEASE", "d5.4.0"); (* readable release version *) EVAL defs.put("CM3_VERSION", "050400"); (* version as number *) EVAL defs.put("CM3_CREATED", "2006-08-01"); (* date of last change *) Olaf -- elego Software Solutions GmbH HRB 77719 Olaf Wagner E-Mail: wagner(at)elego.de Ohmstra?e 9 Tel: +49 30 40 04 19 29 10179 Berlin Fax: +49 30 23 45 86 95 Cranachstra?e 7 Tel: +49 30 85 58 01 81 12157 Berlin Fax: +49 30 85 58 01 88 ------------------> WWW: http://www.elego-software-solutions.com From jayk123 at hotmail.com Sat Dec 30 04:00:11 2006 From: jayk123 at hotmail.com (j k) Date: Sat, 30 Dec 2006 03:00:11 +0000 Subject: [M3devel] bootstrapping cm3 from DEC SRC 3.6/pm3? Message-ID: An HTML attachment was scrubbed... URL: From rodney.bates at wichita.edu Sun Dec 31 01:41:07 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Sat, 30 Dec 2006 18:41:07 -0600 Subject: [M3devel] A GC/compiler/Pickle interaction bug Message-ID: <45970723.5070102@wichita.edu> I tracked down a bug unpickling to the following. When executing in ConvertPacking.Read, at ConvertPacking.m3:327, this code: WITH ref = LOOPHOLE(dest, UNTRACED REF REFANY) DO ref^ := v.readRef(nelem.refType); END; has a compiler-generated call on RTCollector.CheckStoreTraced(ref). CheckStoreTraced expects ref to be a normal reference to an object, computes the address of its header (4 bytes less), and sets the dirty bit. But ConvertPacking is reading in to a field of a recently created object that is not first in the object. It computes ref to point to the field, and CheckStoreTraced actually steps on the previous real field instead of the header. It looks like the actions of CheckStoreTraced are needed, but I don't right off hand see how to recode Convert to fix this. It's use of ref can't be moved. Presumably, there could be other unsafe code elsewhere using the same technique to store data. Does the compiler need a different criterion on when to generate the call on CheckStoreTraced? ref is an UNTRACED REF here, but it still is pointing inside a traced object. Maybe people who modify objects in this way need to explicitly call CheckStoreTraced? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From jayk123 at hotmail.com Sun Dec 31 13:58:19 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 12:58:19 +0000 Subject: [M3devel] m3commit not working Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:05:07 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:05:07 +0000 Subject: [M3devel] configuring full paths vs. dependence on %PATH% / %LIB% / %INCLUDE%? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:14:08 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:14:08 +0000 Subject: [M3devel] hosts/targets/toolsets? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:22:54 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:22:54 +0000 Subject: [M3devel] inaccuracy of NT386 and Win32 names? Message-ID: An HTML attachment was scrubbed... URL: From rodney.bates at wichita.edu Thu Dec 21 03:04:14 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Wed, 20 Dec 2006 20:04:14 -0600 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code Message-ID: <4589EB9E.5090109@wichita.edu> Somewhere, a few months back, I accidentally came across some Quake code that tested whether it was being interpreted by the pm3 or cm3 version of Quake. I carefully made a note about it, but now that I need it, I can't find it. As I remember, it tested whether a certain variable was defined, that is predefined by one of the versions and not the other. Does anybody happen to remember, without having to do any digging, where such Quake code might be or what the mysterious variable is? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From wagner at plane.elego.de Thu Dec 21 08:24:26 2006 From: wagner at plane.elego.de (Olaf Wagner) Date: Thu, 21 Dec 2006 08:24:26 +0100 Subject: [M3devel] Distinguishing pm3 from cm3 in Quake code In-Reply-To: <4589EB9E.5090109@wichita.edu> References: <4589EB9E.5090109@wichita.edu> Message-ID: <20061221072426.GA26144@elegosoft.com> On Wed, Dec 20, 2006 at 08:04:14PM -0600, Rodney M. Bates wrote: > Somewhere, a few months back, I accidentally came across some Quake > code that tested whether it was being interpreted by the pm3 or cm3 > version of Quake. I carefully made a note about it, but now that I > need it, I can't find it. As I remember, it tested whether a certain > variable was defined, that is predefined by one of the versions and > not the other. > > Does anybody happen to remember, without having to do any digging, > where such Quake code might be or what the mysterious variable is? You probably think of this code in cvsup/quake/cvsup.quake: % Determine whether we are using the PM3 release of Modula-3. if not defined("PM3") % The procedure "build_standalone" exists only in SRC Modula-3. if not defined("build_standalone") PM3 = "T" end end Since many version, the cm3 builder also defines the following variables, which may be more appropriate for the purpose: EVAL defs.put("CM3_RELEASE", "d5.4.0"); (* readable release version *) EVAL defs.put("CM3_VERSION", "050400"); (* version as number *) EVAL defs.put("CM3_CREATED", "2006-08-01"); (* date of last change *) Olaf -- elego Software Solutions GmbH HRB 77719 Olaf Wagner E-Mail: wagner(at)elego.de Ohmstra?e 9 Tel: +49 30 40 04 19 29 10179 Berlin Fax: +49 30 23 45 86 95 Cranachstra?e 7 Tel: +49 30 85 58 01 81 12157 Berlin Fax: +49 30 85 58 01 88 ------------------> WWW: http://www.elego-software-solutions.com From jayk123 at hotmail.com Sat Dec 30 04:00:11 2006 From: jayk123 at hotmail.com (j k) Date: Sat, 30 Dec 2006 03:00:11 +0000 Subject: [M3devel] bootstrapping cm3 from DEC SRC 3.6/pm3? Message-ID: An HTML attachment was scrubbed... URL: From rodney.bates at wichita.edu Sun Dec 31 01:41:07 2006 From: rodney.bates at wichita.edu (Rodney M. Bates) Date: Sat, 30 Dec 2006 18:41:07 -0600 Subject: [M3devel] A GC/compiler/Pickle interaction bug Message-ID: <45970723.5070102@wichita.edu> I tracked down a bug unpickling to the following. When executing in ConvertPacking.Read, at ConvertPacking.m3:327, this code: WITH ref = LOOPHOLE(dest, UNTRACED REF REFANY) DO ref^ := v.readRef(nelem.refType); END; has a compiler-generated call on RTCollector.CheckStoreTraced(ref). CheckStoreTraced expects ref to be a normal reference to an object, computes the address of its header (4 bytes less), and sets the dirty bit. But ConvertPacking is reading in to a field of a recently created object that is not first in the object. It computes ref to point to the field, and CheckStoreTraced actually steps on the previous real field instead of the header. It looks like the actions of CheckStoreTraced are needed, but I don't right off hand see how to recode Convert to fix this. It's use of ref can't be moved. Presumably, there could be other unsafe code elsewhere using the same technique to store data. Does the compiler need a different criterion on when to generate the call on CheckStoreTraced? ref is an UNTRACED REF here, but it still is pointing inside a traced object. Maybe people who modify objects in this way need to explicitly call CheckStoreTraced? -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates at wichita.edu From jayk123 at hotmail.com Sun Dec 31 13:58:19 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 12:58:19 +0000 Subject: [M3devel] m3commit not working Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:05:07 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:05:07 +0000 Subject: [M3devel] configuring full paths vs. dependence on %PATH% / %LIB% / %INCLUDE%? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:14:08 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:14:08 +0000 Subject: [M3devel] hosts/targets/toolsets? Message-ID: An HTML attachment was scrubbed... URL: From jayk123 at hotmail.com Sun Dec 31 14:22:54 2006 From: jayk123 at hotmail.com (j k) Date: Sun, 31 Dec 2006 13:22:54 +0000 Subject: [M3devel] inaccuracy of NT386 and Win32 names? Message-ID: An HTML attachment was scrubbed... URL: