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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6b1a1ed8b075945 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!57g2000hsv.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Allocators and exceptions Date: Wed, 12 Sep 2007 05:22:37 -0700 Organization: http://groups.google.com Message-ID: <1189599757.106695.147440@57g2000hsv.googlegroups.com> References: <1189323618.588340.87180@o80g2000hse.googlegroups.com> <1189524788.300591.312380@w3g2000hsg.googlegroups.com> <1189547814.740732.220140@x40g2000prg.googlegroups.com> NNTP-Posting-Host: 137.138.37.241 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1189599757 27021 127.0.0.1 (12 Sep 2007 12:22:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Sep 2007 12:22:37 +0000 (UTC) In-Reply-To: <1189547814.740732.220140@x40g2000prg.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070724 Red Hat/1.5.0.12-0.3.slc3 Firefox/1.5.0.12,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 57g2000hsv.googlegroups.com; posting-host=137.138.37.241; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1905 Date: 2007-09-12T05:22:37-07:00 List-Id: On 11 Wrz, 23:56, Adam Beneschan wrote: > OK, I think I have one. GNAT compiles and runs it, although I haven't > checked the language rules carefully to make sure it's legal. Without checking the language rules carefully, I think this is a legal program demonstrating artificially broken design. Consider that there is no exception and instead you call Unchecked_Deallocation after successfully creating the object. The P pointer will be dangling. So what is your example proving? That we can make dangling pointers in Ada? This is already known. Show me an example that is not artificially broken and that breaks exactly because of the weaknesses of the idea that was discussed, not because of the weaknesses that are in the rest of the example. -- Maciej Sobczak http://www.msobczak.com/