From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5117b1b6391a0e06 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 28 Jun 2004 19:07:40 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1087410710.477506@master.nyc.kbcfp.com> <1087474761.60413@master.nyc.kbcfp.com> <7o83d0hf6sqgng2980e1tg7iu864m5m50u@4ax.com> <1in5d05aa4rfqlt7e76gk87ucd3vuru6pm@4ax.com> <1087564576.388973@master.nyc.kbcfp.com> <1087575262.304708@master.nyc.kbcfp.com> <2i5dd0lu0i3a8bokfh7916r4j67g42ri4o@4ax.com> Subject: Re: A simple ADA puzzle (I haven't the answer) Date: Mon, 28 Jun 2004 19:08:04 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-fxeHKrfa/H7aN5T+cKy3oI2x8HgPqoZqgdXDYNbiARgzr87KkFkDRx39wraJd4gQTjReVuMiWSaJKOY!kSz05e8pCGk360+yqCCjntyNAQxt4hU5nDS6dquQpZFPIPDWGt0Iecgou4KrfmvJRDsLoHEChpjx X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1985 Date: 2004-06-28T19:08:04-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:pan.2004.06.26.07.41.42.776463@dmitry-kazakov.de... > On Fri, 25 Jun 2004 12:37:20 -0500, Randy Brukardt wrote: > > If you creating dangling pointers with Unchecked_Conversion or with > > 'Unchecked_Access, and the dangling pointer is dereferenced, your program is > > erroneous. Nothing new there. > > Well, there are shades of being erroneous. Probably, because accessibility > checks were undiscriminating, 'Unchecked_Access managed to become almost a > decent citizen. It seems that now 'Unchecked_Access will be less > necessary, but more dangerous. Bad news for those lazy, who accustomed to > type it automatically instead of 'Access. I don't follow. It's going to be just as necessary, because the usual use is to use it inside of a subprogram to put an object on a global chain. Even if the object is known to be global, or finalization cleans up properly (as in Claw), it still fails the accessibility check. Similarly, the creation of dangling pointers isn't new. And it could hardly get more dangerous than dereferencing a dangling pointer and writing over someone else's memory - which can happen with any dangling pointer. Dispatching (which only involves reading) is the least of the problems -- and typically it would trap even before getting anywhere (because the tag has been overwritten) -- much less bad than the typical write through a dangling pointer. Randy.