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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,33475212a243333c,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-07 03:39:45 PST Path: archiver1.google.com!news1.google.com!postnews1.google.com!not-for-mail From: byhoe@greenlime.com (Adrian Hoe) Newsgroups: comp.lang.ada Subject: Stack overflow (or erroneous memory access) Date: 7 Nov 2001 03:39:45 -0800 Organization: http://groups.google.com/ Message-ID: <9ff447f2.0111070339.17ae1674@posting.google.com> NNTP-Posting-Host: 210.186.172.100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1005133185 2895 127.0.0.1 (7 Nov 2001 11:39:45 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 7 Nov 2001 11:39:45 GMT Xref: archiver1.google.com comp.lang.ada:15983 Date: 2001-11-07T11:39:45+00:00 List-Id: I got an exception raised PROGRAM_ERROR : stack overflow (or erroneous memory access) when I compiled the following code and executed it: -------------------------------------------------------------- with Ada.Text_Io; use Ada.Text_Io; procedure Test_Output is Buffer : String (1 .. 256); Len : Natural; Output : File_Type; begin Create (Output); Put_Line (Output, "Line #1"); Put_Line (Output, "Line #2"); Put_Line (Output, "Line #3"); Put_Line (Output, "Line #4"); Reset (Output, In_File); while not End_Of_File (Output) loop Get_Line (Output, Buffer, Len); if Len < Buffer'Length then Put_Line (Buffer (1 .. Len)); else Put (Buffer); end if; end loop; Delete (Output); end Test_Output; --------------------------------------------------------------- The exception was raised at line 16: "while not End_Of_File (Output) loop". I could not figure out the cause of this runtime error. Could someone help? I am using gnat-3.13p-7 (downloaded from gnuada.org for RH5.x) on Caldera OpenLinux 2.3. Thanks.