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-Thread: 103376,872c9f672f291e9b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!news.belwue.de!news.uni-stuttgart.de!not-for-mail From: Stefan Bellon Newsgroups: comp.lang.ada Subject: Re: GNAT and -fstack-check, does it work? Date: Wed, 14 Nov 2007 10:49:18 +0100 Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <20071114104918.248861fb@cube.tz.axivion.com> References: <47375ee3$0$27835$39db0f71@news.song.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: infosun2.rus.uni-stuttgart.de 1195033840 12017 129.69.226.23 (14 Nov 2007 09:50:40 GMT) X-Complaints-To: news@news.uni-stuttgart.de NNTP-Posting-Date: Wed, 14 Nov 2007 09:50:40 +0000 (UTC) X-Newsreader: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu) X-URL: http://www.axivion.com/ Xref: g2news1.google.com comp.lang.ada:18363 Date: 2007-11-14T10:49:18+01:00 List-Id: On Sun, 11 Nov, Niklas Holsti wrote: [-gnato -fstack-check] > I have been using those options for a while, but I was recently hit > by a bug in which stack overflow made the program abort with > Segmentation Violation (signal 11 = SIGSEGV) instead of the > expected Storage_Error exception. This is under Debian Sarge with > gnat 3.15p. We are hit by that bug, feature or whatever it is since GNAT 3.15p onwards (up to GNAT Pro 6.0.2 now). It seems to be some combination of options. We just decided not to specify -fstack-check. But perhaps it's something we are missing. BTW: We are on Debian as well (although always unstable). > I'd appreciate to hear from the c.l.a crowd: > > - Does -fstack-check work for you? Which versions of > GNAT, which systems? Do you need to set GNAT_STACK_LIMIT > too? I see something like ... Execution terminated by unhandled exception Exception name: STORAGE_ERROR Message: stack overflow (or erroneous memory access) Call stack traceback locations: 0x43d76e99 ... whenever I execute an application compiled with our switches: -gnat05 -gnata -gnatef -gnatf -gnatn -gnatU -gnatwa -gnatwl -gnatyaAbdefhiklmnprtx -O0 -g -gnato -fstack-check > - Is the behaviour different for dynamic linking and > static linking? Which GNAT, which system? We have not done static builds for a long time, but IIRC we had the problem then as well, but don't quote me on that. GNAT versions ... see above. > - Have you had problems like those described in bug 13757? > Do you know if that bug affects GNAT? We have never used -fstack-check with C code, I'm afraid. -- Stefan Bellon