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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,11d70610d4cc79b7 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: storage size pragmas Date: 2000/05/08 Message-ID: <8f6kko$944$1@nnrp1.deja.com>#1/1 X-Deja-AN: 620670005 References: <3915BC28.A0D56A68@telepath.com> <20000507181719.23279.00001715@ng-fc1.aol.com> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon May 08 14:57:38 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-05-08T00:00:00+00:00 List-Id: 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.