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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.157.6.11 with SMTP id 11mr31359934otn.7.1473095884341; Mon, 05 Sep 2016 10:18:04 -0700 (PDT) X-Received: by 10.157.9.106 with SMTP id 97mr2766997otp.7.1473095884297; Mon, 05 Sep 2016 10:18:04 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!e124no1385131ith.0!news-out.google.com!b4ni10668iti.0!nntp.google.com!e124no1385121ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 5 Sep 2016 10:18:04 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.218.37.33; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.218.37.33 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <397dd8cb-2afc-43cd-972d-3b1a5a90cd5d@googlegroups.com> Subject: Re: Can anyone help with GNAT.Perfect_Hash_Generators ? (Possible memory corruption) From: Stephen Leake Injection-Date: Mon, 05 Sep 2016 17:18:04 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31706 Date: 2016-09-05T10:18:04-07:00 List-Id: On Sunday, September 4, 2016 at 2:22:02 PM UTC-5, Natasha Kerensikova wrote= : > Hello, >=20 > I'm afraid this is a bit off-topic, since I'm asking about a package > provided with GNAT rather than Ada language,=20 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. >=20 > So I'm using GNAT.Perfect_Hash_Generators in two different programs, but > with the same sequence of calls=C2=A0: 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 minim= al 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.=20 Yes; you should get an exception or compilation error before corrupting mem= ory. 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 thos= e 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.