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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b2dd3ff35d68d825 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-10 04:49:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!82-43-33-254.cable.ubr01.croy.blueyonder.co.UK!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Unchecked_Deallocation subtleties Date: Thu, 10 Apr 2003 12:49:16 +0100 Organization: ThoughtWing Computer Software Message-ID: References: NNTP-Posting-Host: 82-43-33-254.cable.ubr01.croy.blueyonder.co.uk (82.43.33.254) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed X-Trace: fu-berlin.de 1049975351 11047742 82.43.33.254 (16 [25716]) In-Reply-To: User-Agent: Opera7.03/Win32 M2 build 2670 Xref: archiver1.google.com comp.lang.ada:36044 Date: 2003-04-10T12:49:16+01:00 List-Id: On Wed, 9 Apr 2003 16:23:36 -0500, Randy Brukardt wrote: > ... > > The implementation is clearly wrong. > > The only place that the standard ever talks about calling the storage > pool Deallocate is in 13.11.2(9). That paragraph starts with "Free(X), > when X is not already equal to null...". So, there is no justification > for calling Deallocate, or Finalize, or doing anything when X is not > null. > > "no effect" here means just that -- no effect: nothing is called, > executed, etc. I do agree that that term is not formally defined, so > there is a bit of wiggle room for implementations, but calling arbitrary > routines because its convinient seems to be beyond any wiggle room. > Especially as it is easy to do it correctly. > > That said, unless you can get a patch from a vendor (and that usually > means that you're a favored customer), you probably ought to work around > it - it does not seem hard to do so. I'm sorry to vacillate, but I must add here that I completely /agree/ with Randy; I now disagree with my own previous post! I agree that the implementation is /wrong/ to call Deallocate when the object is already null. (I was thinking about something a bit different when writing my previous post.) To do otherwise not only goes against what the RM says, but it also goes against good sense. Apologies for any confusion! -- Nick Roberts Jabber: debater@charente.de [ICQ: 159718630]