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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.tiscali.de!newsfeed.freenet.de!feeder.news-service.com!213.132.189.1.MISMATCH!multikabel.net!feed10.multikabel.net!feeder1.cambrium.nl!feed.tweaknews.nl!news.netcologne.de!nhp.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Finalization From: Georg Bauhaus In-Reply-To: References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <2006052509454116807-gsande@worldnetattnet> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1164108408.13151.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Tue, 21 Nov 2006 12:26:49 +0100 NNTP-Posting-Date: 21 Nov 2006 12:17:44 CET NNTP-Posting-Host: 28b8e0e7.newsspool4.arcor-online.net X-Trace: DXC=[Y>komON`;9LNKYb?b>0764IUKMZlZAe?0;7=:>a@3He_lA4c0dV[V[:Qa9@Llf4:_kD;9 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7600 Date: 2006-11-21T12:17:44+01:00 List-Id: On Tue, 2006-11-21 at 10:02 +0100, Philippe Tarroux wrote: > I have a problem trying to use controlled types. My purpose was to use > finalize to deallocate a big data structure each time a reuse. > > I wrote a simpler program that exhibits the problem too. here is the > code followed by a comment on what I observed: Here is what I get: $ ./main 1 In process function In process procedure Finalize: Finalize: Finalize: Finalize: *** glibc detected *** double free or corruption (top): 0x0806f820 *** raised PROGRAM_ERROR : unhandled signal As a quick guess, maybe it would be best not to call Finalize yourself? (Perhaps an activation record is the scope to think of in the case of GNAT, but that's only another guess.) -- Georg