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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Alejandro R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Storage_Error: mine's or gnat's fault? Date: Fri, 3 Jun 2016 23:43:25 +0200 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 3 Jun 2016 21:43:26 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6d84a6c85b8a1a019c7ed28ae8b7efda"; logging-data="10885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19n5ymWtEA8xCXVtiUgvLy7" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: Cancel-Lock: sha1:Z9+eFAeYVh/+aLySc7chmcAVr6A= Xref: news.eternal-september.org comp.lang.ada:30596 Date: 2016-06-03T23:43:25+02:00 List-Id: On 03/06/16 23:01, Alejandro R. Mosteo wrote: > I'm seeing this (sanitized) stack trace when using the > *Ada.Containers.Holders* package (both 2015/2016 version): > > --8<-- > raised STORAGE_ERROR : stack overflow or erroneous memory access > > Ada.Tags.Displace at s-stoele.adb:97 > Rx.Producers.Holders.Definites.Reference at a-coinho.adb:379 > Rx.Examples.Strings.Subscribe at rx-observable.adb:33 > Rx.Examples.Strings."&" at rx-observable.adb:81 > Rx.Examples.Basic at rx-examples-basic.adb:14 > Main at b__rx-examples-basic.adb:345 > --8<-- > > Since my code has not a single pointer, "new", unchecked operation or > access I feel the responsibility might not be mine... Also the offending > line is a bit of unfathomable (to me) Address arithmetic. I'd post a > sample but the code is spread among several files right now. I could try > to synthesize a self-contained example if it seems a legit bug in the > sages' opinion. > > In the meantime I'm going to try with an indefinite list as container. Using the Indefinite_Doubly_Linked_List the problem is equally suspect (this is code from a-cidlli.adb): function First_Element (Container : List) return Element_Type is begin if Checks and then Container.First = null then raise Constraint_Error with "list is empty"; end if; return Container.First.Element.all; -- <-- RAISES end First_Element; I'll try to produce a small trigger. > > Álex.