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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ed3a51e96a1c868b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news-transit.tcx.org.uk!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 23 Feb 2011 18:24:23 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Using local storage pools... Date: Thu, 24 Feb 2011 00:27:17 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <7elam6trrv39c3p9iop4fiduqa1jrat4r4@4ax.com> <87ipwawk3b.fsf@ludovic-brenta.org> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-aQzZ3xMqEXW4+KNueT2P8F4yFyBPiy0z+xQDIObNHV58ERFeDVH3vCvVpn8A/Z6kxSi70TxCHPohOzk!6IWil7RiEmdy8s23JRJO2dbShVDytiQgEVJ1WzbJl6QQWH2CIqH6qHfrjlzr/7VHABkWqWZtVoaq!zWc= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com 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.3.40 X-Original-Bytes: 2472 Xref: g2news2.google.com comp.lang.ada:18545 Date: 2011-02-24T00:27:17+00:00 List-Id: On Wed, 23 Feb 2011 21:51:20 +0100, Ludovic Brenta wrote: >Brian Drummond writes: >> I am trying to learn a little about storage pools, with a view to >> (hopefully) using local pools to improve the Binary_Trees benchmark in >> the same way as some of the faster C benchmarks. >> ------------------------------------------------------------------------------------ > >This looks like a genuine bug at s-pooloc.adb:114. To trigger the bug, >two conditions must hold simultaneously: > >* the pool contains exactly one allocated object. >* the user calls Unchecked_Deallocation on this object. Good detective work, thanks. >Because this pool is intended for use without any explicit >Unchecked_Deallocation, I would qualify this bug as minor. I believe it should support both strategies (especially since it HAS a "deallocate") but I can't argue it's anything other than minor if I'm the first to find it! >The workaround, in your case, is to simply not do any >Unchecked_Deallocation and let the finalization of the storage pool do >the deallocation. Which was the original intent. Thanks for the detective work! I have been emailed privately, suggesting I report it to Adacore. Should I also report it to either Debian, or mainstream GCC? - Brian