comp.lang.ada
 help / color / mirror / Atom feed
* Stack overflow (or erroneous memory access)
@ 2001-11-07 11:39 Adrian Hoe
  2001-11-07 14:05 ` James Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hoe @ 2001-11-07 11:39 UTC (permalink / raw)


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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Stack overflow (or erroneous memory access)
  2001-11-07 11:39 Stack overflow (or erroneous memory access) Adrian Hoe
@ 2001-11-07 14:05 ` James Rogers
  2001-11-08  3:12   ` Adrian Hoe
  0 siblings, 1 reply; 3+ messages in thread
From: James Rogers @ 2001-11-07 14:05 UTC (permalink / raw)


Adrian Hoe wrote:
> 
> I got an exception raised PROGRAM_ERROR : stack overflow (or erroneous
> memory access) when I compiled the following code and executed it:
> 

 [ code snipped ]

> 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.
> 

I ran your code using gnat-3.13p on Win98 with no exceptions. There
must be some diference in the compiler ports.

Jim Rogers
Colorado Springs, Colorado USA



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Stack overflow (or erroneous memory access)
  2001-11-07 14:05 ` James Rogers
@ 2001-11-08  3:12   ` Adrian Hoe
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Hoe @ 2001-11-08  3:12 UTC (permalink / raw)


James Rogers <jimmaureenrogers@worldnet.att.net> wrote in message news:<3BE93FA1.79B7695F@worldnet.att.net>...
> Adrian Hoe wrote:
> > 
> > I got an exception raised PROGRAM_ERROR : stack overflow (or erroneous
> > memory access) when I compiled the following code and executed it:
> > 
> 
>  [ code snipped ]
> 
> > 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.
> > 
> 
> I ran your code using gnat-3.13p on Win98 with no exceptions. There
> must be some diference in the compiler ports.
> 
> Jim Rogers
> Colorado Springs, Colorado USA


I downloaded gnat-3.13p from ftp://cs.nyu.edu/pub/gnat/ and no
exceptions raised this time. Something must be wrong with the
gnat-3.13p rpm I downloaded from www.gnuada.org. or I had an error in
my download. The rpm is for glibc2.0 or (RH5.x).

Does anybody have the same problem with the rpm?

I have also sent an e-mail to the packager, Jeurgen Pfeifer and hope
to identify the source of the problems and have it fixed.

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-08  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-07 11:39 Stack overflow (or erroneous memory access) Adrian Hoe
2001-11-07 14:05 ` James Rogers
2001-11-08  3:12   ` Adrian Hoe

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