comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: GNAT compiler problem?
Date: 1998/08/07
Date: 1998-08-07T00:00:00+00:00	[thread overview]
Message-ID: <ExBuFF.6Aq.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 35CA2A91.1DB668CF@netgate.net

Rusnak (jrusnakzzz@netgate.net) wrote:
: I have been coding in Ada on a large project recently and until recently
: have had little problems.  Unfortunately,
: my program recenlty coughed up a Storage_Error which surprised me.
: After removing my new code and putting it back
: in piece by piece, I got a genuine segmentation fault.  I used gdb to
: help analyze the code, and found that it was crashing on
: a type definition.   (The actual compiler-mangled procedure name was
: somethling like "my_package___read").  The type definition was a type
: derived off
: of a (base) tagged type.

: I then set a breakpoint there and  reran the code.  After stepping
: through the code after the first break, I found that the code execution
: was going through an infinite loop
: on  type definitions:  that is to say,    the call to
: "my_package___read" (which the debugger indicated as originating from
: the type
: definition) called a procedure named something like
: "base_package___read_2" (originating at the base class type
: definition).  It then
: called "my_package_read" again and so the cycle goes.    I assume that
: the "read" is an internal procedure defined internally to the compiler,
: since no such procedure exists in either of the packages (name mangling
: in Ada by this compiler seems rather straightforward).

The "__read" operation is probably the compiler-generated 'Read routine
(a "stream" attribute), which is used automatically as part of the 
distribution annex for message "unmarshalling", as well as by explicit 
uses of the 'Read attribute and 'Input attribute.  Are you making use of 
any of these features?

: Has anyone seen this behavior before?

: Thanks

: -John

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




  reply	other threads:[~1998-08-07  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-06  0:00 GNAT compiler problem? Rusnak
1998-08-07  0:00 ` Tucker Taft [this message]
1998-08-11  0:00   ` Rusnak
replies disabled

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