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,b5a7187422c2042a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-28 10:04:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3C052738.AEF0049E@Raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: reasons for segmentation faults on linux References: <9eb165bd.0111280403.3f6bc3ea@posting.google.com> <3C04CF6F.C42B1DFC@earthlink.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 28 Nov 2001 12:04:40 -0600 NNTP-Posting-Host: 192.27.48.44 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1006970686 192.27.48.44 (Wed, 28 Nov 2001 12:04:46 CST) NNTP-Posting-Date: Wed, 28 Nov 2001 12:04:46 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:17117 Date: 2001-11-28T12:04:40-06:00 List-Id: Preben Randhol wrote: > [snip] > Infinite recursion: > > procedure A is > begin > A; > end A; > > % gnatmake a.adb > gnatgcc -c a.adb > a.adb:3:04: warning: possible infinite aursion > a.adb:3:04: warning: Storage_Error may be raised at run time > gnatbind -x a.ali > gnatlink a.ali > > % ./a > Segmentation fault > > Why isn't Storage_Error raised? GNAT 3.13p on GNU/Debian Linux. > RTFM :-). Add -fstack-check to the gnatmake command line to get stack checking turned on. As a suggestion, define an environment name w/ the "desired" command line options & use it instead. At our site... GNAT_TESTING="-g -gnata -funwind-tables -gnatO -j3 -gnatn -O2 -gnatwa -gnatf -fstack-check -gnato -gnatq -gnatU" and it properly issues the error... raised STORAGE_ERROR : stack overflow detected Though perhaps I should submit a bug report to ACT about the warning being in error if stack checking is suppressed. --Mark