comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Kolden <bakolden5@gmail.com>
Subject: Weird Bug in Get_Line
Date: Wed, 26 Apr 2017 00:38:55 -0700 (PDT)
Date: 2017-04-26T00:38:55-07:00	[thread overview]
Message-ID: <1896933e-e985-420b-a4fe-9cca76af9976@googlegroups.com> (raw)

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;

             reply	other threads:[~2017-04-26  7:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26  7:38 Brian Kolden [this message]
2017-04-26  8:28 ` Weird Bug in Get_Line Brian Drummond
2017-04-26  8:42   ` Brian Kolden
2017-04-26  9:10 ` Brian Kolden
2017-04-26 10:58 ` Simon Wright
2017-04-26 17:03 ` Jeffrey R. Carter
2017-04-26 19:32   ` Brian Kolden
2017-04-26 20:44     ` Jeffrey R. Carter
2017-05-14 21:49       ` moy
replies disabled

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