comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Can anyone help with GNAT.Perfect_Hash_Generators ? (Possible memory corruption)
Date: Mon, 5 Sep 2016 10:18:04 -0700 (PDT)
Date: 2016-09-05T10:18:04-07:00	[thread overview]
Message-ID: <397dd8cb-2afc-43cd-972d-3b1a5a90cd5d@googlegroups.com> (raw)
In-Reply-To: <slrnnsot2o.1cq.lithiumcat@nat.rebma.instinctive.eu>

On Sunday, September 4, 2016 at 2:22:02 PM UTC-5, Natasha Kerensikova wrote:
> Hello,
> 
> I'm afraid this is a bit off-topic, since I'm asking about a package
> provided with GNAT rather than Ada language, 

No problem; that's on topic for this group.

> I'm very lost and would
> greatly appreciate any hint or help to work around it.
> 
> So I'm using GNAT.Perfect_Hash_Generators in two different programs, but
> with the same sequence of calls : 254 times Insert, then Initialize and
> Compute. The problem already shows at this point, even though I loop
> around retrying with different seeds and/or more vertices.

Please post the code that shows the problem; it's very hard to say anything useful otherwise. If the code is large, please try to reduce it to a minimal set that shows the problem.

Also state what version of the compiler, on what OS.

> Now one of the reasons I like Ada so much is that under normal
> circumstances it's impossible to corrupt memory, especially in a way
> that depends on what other code is compiled besides it. 

Yes; you should get an exception or compilation error before corrupting memory.

However, some of the GNAT packages are implemented in C, so they don't have that level of protection. But AdaCore is very careful in implementing those packages, and guarantees them for paying customers, so you should expect them to work.

> So is there anybody who can help with it? Or give me any clue?
> Should I offer the verbose log, the source code, some other info?

the log and the source code would be helpful.

> Or should I just consider myself lucky when a GNAT.* package works, and
> find some other solution when they don't?

No, they all should "just work", but sometimes they have bugs, which should be reported.


  reply	other threads:[~2016-09-05 17:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04 19:22 Can anyone help with GNAT.Perfect_Hash_Generators ? (Possible memory corruption) Natasha Kerensikova
2016-09-05 17:18 ` Stephen Leake [this message]
2016-09-06 19:24   ` Natasha Kerensikova
2016-09-06 19:52     ` Florian Weimer
2016-09-06 20:55       ` Jeffrey R. Carter
2016-09-06 21:04       ` Simon Wright
2016-09-08 16:00         ` Anh Vo
2016-09-08 17:04           ` Simon Wright
2016-09-08 18:03             ` Anh Vo
2016-09-08 18:10               ` Simon Wright
2016-09-08 19:08               ` Jeffrey R. Carter
2016-09-09  6:04                 ` Natasha Kerensikova
2016-09-09  6:15                   ` Jeffrey R. Carter
2016-09-09  8:25                   ` J-P. Rosen
2016-09-08 19:19       ` Florian Weimer
2016-09-06 19:44   ` Florian Weimer
replies disabled

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