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,174ca8cf9b3c1596 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Help: program won't ends (GNAT) From: Georg Bauhaus In-Reply-To: <45b4726b$0$31548$39db0f71@news.song.fi> References: <45b3f4a4$0$30117$426a74cc@news.free.fr> <45b4726b$0$31548$39db0f71@news.song.fi> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1169463261.3985.23.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Mon, 22 Jan 2007 11:54:22 +0100 NNTP-Posting-Date: 22 Jan 2007 11:53:29 CET NNTP-Posting-Host: 168e359d.newsspool1.arcor-online.net X-Trace: DXC=_noI>3FeBFO=8m7nZkdN^@ic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbInL?Lk8=N\TIN[W On Mon, 2007-01-22 at 10:14 +0200, Niklas Holsti wrote: > Yves Bailly wrote: > > When I run the program, both strings are displayed, but the program doesn't > > exit: it just keeps running, eating 75% of my CPU power > ... > I observe the same behaviour on gnat 3.15p, Debian Linux. Seems to be a > GNAT bug of respectable age. > It seems there is a circle in the pointers used for unbounded string in this case. Finalization jumps back and forth between Ada.Strings.Unbounded.Finalize (Object : in out Unbounded_String) and System.Finalization_Implementation.Finalize_List (L : Finalizable_Ptr) where object.reference = Null_String'Access and object.next = L -- same address!? But Ada.Strings.Unbounded.Finalize does nothing, probably because: -- Note: Don't try to free statically allocated null string There is a loop in Finalize_List which intending to step along the list in L and call Finalize on each pointer. But this pointer stays the same. Can any GNAT expert have a look, please?