comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@arcor.de>
Subject: Re: Help: program won't ends (GNAT)
Date: Mon, 22 Jan 2007 11:54:22 +0100
Date: 2007-01-22T11:53:29+01:00	[thread overview]
Message-ID: <1169463261.3985.23.camel@localhost> (raw)
In-Reply-To: <45b4726b$0$31548$39db0f71@news.song.fi>

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?





  reply	other threads:[~2007-01-22 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-21 23:17 Help: program won't ends (GNAT) Yves Bailly
2007-01-22  8:14 ` Niklas Holsti
2007-01-22 10:54   ` Georg Bauhaus [this message]
2007-01-22 19:25   ` Yves Bailly
2007-01-23 19:05     ` Björn Persson
2007-01-25  0:44       ` Jeffrey Creem
2007-01-22  9:51 ` Brian May
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox