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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,da39df064d0b18d7 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 04 Aug 2009 11:17:53 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna) References: <4a776a94$0$31878$9b4e6d93@newsspool3.arcor-online.net> <4a776b25$0$31878$9b4e6d93@newsspool3.arcor-online.net> <47559b1f-cb97-455b-b76d-98a4f8a834ac@f37g2000yqn.googlegroups.com> In-Reply-To: <47559b1f-cb97-455b-b76d-98a4f8a834ac@f37g2000yqn.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a77fcc3$0$30229$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 04 Aug 2009 11:17:55 CEST NNTP-Posting-Host: 5a95e4d4.newsspool1.arcor-online.net X-Trace: DXC=mQH:?hhAPMcJ00P1S40fZgic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbi48SASO@aB9dA:ho7QcPOVc48`8M?IHh``5GYiihF?e9a X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7560 Date: 2009-08-04T11:17:55+02:00 List-Id: Ludovic Brenta wrote: > Georg Bauhaus wrote on comp.lang.ada: >> Georg Bauhaus wrote: >>> The GNAT that comes with Ubuntu 9.04 (GCC 4.3.3) >>> produces storage errors where GNAT on Debian Lenny >>> (GCC 4.3.2) and GNAT 2007 on Windows (4.3.1) don't. >> The latter is 4.1.3, sorry. > > From the symptoms you describe and the workaround you found, it seems > to me not related to the compiler but rather to the way the kernel is > configured. It looks like Ubuntu's default stack size is much smaller > than on Debian or Windows. What does "ulimit -s" say on your Ubuntu > and Debian? 8192 is the default output of ulimit -s on Ubuntu. I had set ulimit -s $((8192 * 64)) on both Ubuntu 9.04 and Debian 5 and both exhibit the same symptoms. Why? More guesswork: Is an empty Unbounded_String a heavy construct? Observing the memory consumption of regexdna, for reading and matching the ~50 Mo input it does not consume more than about ~60 Mo, according to free(1) and top. Then, the stack allocation of the lines array seems to hit some memory boundary. (625_000 default initialized Vstrings, which is a subtype of Unbounded_String.) valgrind (in default mode) did not find anything IIRC.