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,57ca86d2263c2ca9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-29 21:44:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!195.40.0.160.MISMATCH!mango.news.easynet.net!easynet-melon!easynet.net!news-peer.gradwell.net!not-for-mail Newsgroups: comp.lang.ada From: porton@ex-code.com (Victor Porton) Date: Thu, 30 Jan 2003 09:28:32 +0500 References: <3e379038$0$350$bed64819@news.gradwell.net> Organization: Extreme Code Software (http://ex-code.com) Subject: Re: Gnat: system__finalization_implementation__finalize_list Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Content-Type: text/plain; charset=us-ascii X-URL: http://www.ex-code.com/ Message-ID: <3e38bbbc$0$346$bed64819@news.gradwell.net> NNTP-Posting-Date: 30 Jan 2003 05:44:28 GMT NNTP-Posting-Host: 195.149.39.13 X-Trace: 1043905468 news.gradwell.net 346 mail2news/195.149.39.13 X-Complaints-To: news-abuse@gradwell.net Xref: archiver1.google.com comp.lang.ada:33590 Date: 2003-01-30T05:44:28+00:00 List-Id: In article , Bill Findlay writes: > On 29/1/03 23:35, in article 3e38664a$0$351$bed64819@news.gradwell.net, > "Victor Porton" wrote: > >> In article , >> Stephen Leake writes: >>> porton@ex-code.com (Victor Porton) writes: >>> >>>> Ideas what this means, how to find the error? >>>> (All checks are turned on!) >>>> >>>> Program received signal SIGSEGV, Segmentation fault. >>>> 0x40164c96 in system__finalization_implementation__finalize_list () >>>> from /usr/lib/libgnat-3.14p.so.1 >>> >>> Run under the debugger and trace up the stack. >> >> It is inside of Ada libraries. To check I would need to download the >> Gnat sources and probably recompile these :-( >> >> Oh, Ada is not so reliable as I cannot find a cause of segfault with >> all checks turned on! :-~ Like C++... >> >>>> This error appears after exiting my main rountine (well, the main >>>> rountine is not a procedure but a begin...end block of a package >>>> body.) >>> >>> That's _not_ a main routine; in Ada, the main routine must be a >>> library level procedure. Hmm, can't find that in the LRM, maybe that's >>> a GNAT distinction. >> >> "Main rountine" was just my informal wording. >> >>> The sequence of statements in a package body is executed at >>> elaboration time, before the main program's sequence of statements. >> >> No main procedure at all in my program. > > So, have we got this right: > > (1) You compiled a package (in effect, a library of routines, NOT a program) > (2) You persuaded the OS to execute its object code > (3) You complain about Ada because it does not execute entirely correctly? > > What check do you expect to be able to detect this? (1) I compiled my program whose effectively main rountine is not a procedure but a begin...end block of a package specifically designed to be used as the main rountine. It is perfectly legal accordingly ARM (however not recommended by the style guide which I not obliged to follow). (2) I executed a properly linked executable with no library level procedures. It is legal. It is Gnat whose manual I have read, and theoretically should work correctly.