Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!usc!rutgers!bpa!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: MutualExclude for Gadgets Keywords: Amiga MutualExclude Message-ID: <7980@cbmvax.UUCP> Date: 23 Sep 89 02:17:12 GMT References: <1849@cbnewsd.ATT.COM> <125013@sun.Eng.Sun.COM> <7964@cbmvax.UUCP> <125083@sun.Eng.Sun.COM> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Distribution: usa Organization: Commodore Technology, West Chester, PA Lines: 45 In article <125083@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes: >In article <7964@cbmvax.UUCP> mks@cbmvax.UUCP (Michael Sinz - CATS) writes: >>Gee, Chuck, you didn't really say that did you? Location 0 is undefined >>and can contain any value, including ODD values. (In fact, early A590 >>drives placed an odd value at location 0) ;-) > >Actually I did say it, and what's really funny is that Commodore dug the >exact same hole that the VAX implementation of UNIX had. *0 == 0. And >what is one of the reccommended *diagnostics* of the Amiga ? Hmmm? It's >MemWatch trying to guarantee that *nothing* ever writes to low memory. >Endorsed by none other than C/A itself. And even your comment above >about how the 590 *used* to write to location 0, but doesn't now implies >that someone convinced you it was a bug too. Endorsed?? We also put out mungmem, which purposely puts evil values there. Unfortunately, not everyone has an analyzer, or they could also check (as we do) their software for reads of location 0. If "endorsing" consists of not having any way to trap it, well.... Anyone who depends on *0 == 0 is BROKEN. Period, end of sentence. Also, no program should be writing there either (which is why the A590 doesn't anymore). >#define RATIONAL_PROGRAMMING_FOR_A_LIVING_MODE >Depending on implementation peculiarities in any C program >(especially that dereferencing a NULL pointer will point at a 0) is a >major no-no. >#endif Quite. >So in summary, everyone may agree that looking at *0 is a bug but you will >have a difficult time justifying breaking programs that might depend on >this behaviour in the future given your implicit support in the past. Looking at *0? Must we add 0-detect circuits in order to not "support" it? Sorry if I sound testy, I just found some major stuff that was playing evil games and calling internal BCPL routines that shouldn't have been. Grrrr. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup Common phrase heard at Amiga Devcon '89: "It's in there!"