comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: storage size pragmas
Date: 2000/05/08
Date: 2000-05-08T00:00:00+00:00	[thread overview]
Message-ID: <8f6kko$944$1@nnrp1.deja.com> (raw)
In-Reply-To: 20000507181719.23279.00001715@ng-fc1.aol.com

In article <20000507181719.23279.00001715@ng-fc1.aol.com>,
  anthonygair@aol.comremoveme (ANTHONY GAIR) wrote:
>
> The witch is dead.... it was a storage_error.. no exception was
> produced in fact my ada installation does not think it important to
> tell me about any details such as errors. sorry for wasting everyones
> time but ......as it turns out segmentation faults can be caused by
> bad prXXX er ... not placing storage pragmas in big chogablog largist
> tasks.

I'm sorry if I may have misled you a bit here. One of the things that I
forgot is that Gnat (unlike most Ada compilers) does not default to full
checking. Certian checks that are deemed by the compiler writers to be
more expensive than they are worth are turned off by default, even if
that means it technicly isn't following the Ada standard. (Of course the
standard also allows modes where the checks are turned off).

I'm not ragging on the Gnat folks for choosing to do this. Its just not
the typical choice that other compiler vendors have made, so I had
forgotten that ACT did this.

Also Robert Dewar is correct in pointing out that if the check was in
there, your task would just have died silently instead. *Another* thing
I forgot is that I always put a last-ditch handler in my task bodies to
print out information about task-terminating exceptions. The general
form is the following:

   exception
      when Error : others =>
         -- Try to put one last-ditch message to the screen saying
         -- that the {taskname} died
         Ada.Text_Io.Put_Line
            ("{taskname} died with the following exception:" &
             Ada.Characters.Latin_1.Cr & Ada.Characters.Latin_1.Lf &
             Ada.Exceptions.Exception_Information (Error));

If you don't do this, then typically your indication that a task has
died is that other tasks get Program_Error when attempting to rendezvous
with them. That doesn't exactly make for easy debugging.


--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~2000-05-08  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-07  0:00 storage size pragmas ANTHONY GAIR
2000-05-07  0:00 ` Ted Dennison
2000-05-07  0:00   ` Robert Dewar
2000-05-07  0:00   ` ANTHONY GAIR
2000-05-07  0:00     ` Robert Dewar
2000-05-07  0:00     ` Robert Dewar
2000-05-09  0:00       ` ANTHONY GAIR
2000-05-09  0:00         ` Robert A Duff
2000-05-09  0:00           ` Robert Dewar
2000-05-09  0:00             ` Ted Dennison
2000-05-09  0:00             ` Larry Kilgallen
2000-05-09  0:00             ` Robert A Duff
2000-05-10  0:00               ` Laurent Guerby
2000-05-09  0:00         ` Robert Dewar
2000-05-08  0:00     ` Ted Dennison [this message]
2000-05-08  0:00       ` Robert Dewar
2000-05-08  0:00         ` Ted Dennison
2000-05-08  0:00           ` Robert Dewar
2000-05-07  0:00   ` Robert Dewar
2000-05-07  0:00   ` Robert Dewar
2000-05-07  0:00 ` Pascal Obry
2000-05-07  0:00 ` Keith Thompson
replies disabled

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