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!news.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Weird Bug in Get_Line Date: Wed, 26 Apr 2017 08:28:01 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1896933e-e985-420b-a4fe-9cca76af9976@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 26 Apr 2017 08:28:01 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a291df010ad4caa57ae9907d9ae67c55"; logging-data="7134"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fyymuv/GbpoE0dIuw/j0PkbnUujJqVEI=" User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT b8fc14e git.gnome.org/git/pan2) Cancel-Lock: sha1:ejTrQl9xLKoQ5QRMzUls/IJSGmE= Xref: news.eternal-september.org comp.lang.ada:46629 Date: 2017-04-26T08:28:01+00:00 List-Id: On Wed, 26 Apr 2017 00:38:55 -0700, Brian Kolden wrote: > I came across an interesting issue in the Get_Line function. When piping > in a file (using the linux cammand '<') GNAT "raises > ADA.IO_EXCEPTIONS.END_ERROR : a-tigeli.adb:96". > > However, the interesting issue is this only happens for a very small > number of line lengths. I've noticed the exception is only thrown on > lines with length 500, 501, 1000, 1001. Lines bigger or smaller don't > seem to raise the issue, even other multiples of 500. This only is > effected when using a file as input, copying and pasting the line into > the terminal does not seem to trigger it. > > So, is this an GNAT issue or an OS issue? > > > with Ada.Text_IO; use Ada.Text_IO; > procedure Test is > type String_Pointer is access all String; > S : String := Get_Line; > begin > null; > end Test; Which Gnat? Which Linux? -- Brian