comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <spam-away@nowhere.nil>
Subject: Re: A bug in Gnat, or in my code?
Date: Thu, 11 Mar 2004 17:08:34 GMT
Date: 2004-03-11T17:08:34+00:00	[thread overview]
Message-ID: <m214c.85788$dP1.242655@newsc.telia.net> (raw)
In-Reply-To: <mailman.91.1079017221.327.comp.lang.ada@ada-france.org>

Preben Randhol wrote:

> I see. I think you have a bug in that you forgot to trim the text.

No, that's intentional. There might be cases where the value must be 
used as it is, with possible spaces. In fact, I just removed the Trim on 
the name. I improved another part of the program and then the trimming 
became unnecessary.

> Anyhow I made a test of your program and ran it on gnat 3.3.3 from
> Debian and it works there. No crash. So maybe it is only the packaging
> of RedHat? A program shouldn't segmentation fault and this is typically
> an indication of a packaging/installation error.

The Trim you inserted hides the bug, because Trim returns a more 
conventional null string that doesn't cause problems in 
To_Unbounded_String. After I removed it, your program crashes for me.

Did you try my test program on that version of Gnat?

-- 
Björn Persson

jor ers @sv ge.
b n_p son eri nu




  reply	other threads:[~2004-03-11 17:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-11  3:18 A bug in Gnat, or in my code? Björn Persson
2004-03-11  7:47 ` Preben Randhol
2004-03-11 12:48   ` Georg Bauhaus
2004-03-11 13:59     ` Björn Persson
2004-03-12 16:21       ` Florian Villoing
2004-03-12 23:01         ` Björn Persson
2004-03-11 14:29   ` Björn Persson
2004-03-11 14:59     ` Preben Randhol
2004-03-11 17:08       ` Björn Persson [this message]
2004-03-11 17:14         ` Preben Randhol
2004-03-11 18:15           ` Björn Persson
2004-03-11 15:08     ` Preben Randhol
2004-03-12  2:59 ` Björn Persson
2004-03-12  5:25   ` Per Sandberg
2004-03-12 23:01     ` Björn Persson
2004-03-12 11:11   ` Manuel Collado
2004-03-12 23:01     ` Björn Persson
replies disabled

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