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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!j21g2000yqe.googlegroups.com!not-for-mail From: Vadim Godunko Newsgroups: comp.lang.ada Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna) Date: Tue, 4 Aug 2009 02:58:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7d604363-8623-4146-8aa5-9a7ec729023b@j21g2000yqe.googlegroups.com> 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> <4a77fcc3$0$30229$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 93.178.79.224 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1249379937 29783 127.0.0.1 (4 Aug 2009 09:58:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Aug 2009 09:58:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j21g2000yqe.googlegroups.com; posting-host=93.178.79.224; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009071200 SUSE/3.0.12-0.1.2 Firefox/3.0.12,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7561 Date: 2009-08-04T02:58:57-07:00 List-Id: On Aug 4, 1:17=A0pm, Georg Bauhaus wrote: > > 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. =A0Why? > This size is too small, you can setup unlimited size by ulimit -s unlimited > More guesswork: Is an empty Unbounded_String a heavy > construct? =A0Observing 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. =A0Then, 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. Unbounded_String uses constant size of stack for object itself and uses dynamic size on heap for actual value. But note, concatenation operations of strings and arrays can use stack for intermediate result, thus can be the source of problem.