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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ae395e5c11de7bc9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!g11g2000yqe.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: segfault with large-ish array with GNAT Date: Wed, 17 Mar 2010 12:57:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: <61982ea9-58da-44fa-8d48-4e9024c34992@g11g2000yqe.googlegroups.com> References: <642ddf8b-1d45-4f74-83ad-2c755040ca33@k24g2000pro.googlegroups.com> NNTP-Posting-Host: 143.117.23.231 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1268855832 24693 127.0.0.1 (17 Mar 2010 19:57:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 17 Mar 2010 19:57:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g11g2000yqe.googlegroups.com; posting-host=143.117.23.231; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.18) Gecko/2010021719 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10609 Date: 2010-03-17T12:57:12-07:00 List-Id: On Mar 17, 7:21=A0pm, Jerry wrote: > The following program produces a segmentation fault when run with the > array size set to 1_048_343 but not when it is set to 1_048_342. > What's going on and how do I fix it? If I put in a bit of text IO the > allowed array size is some what smaller. > > GNATMAKE 4.4.0 20080314 (experimental) [trunk revision 133226] > OS X 10.5.8 > 4 GB RAM > > procedure bomb is > =A0 =A0 type Float_Array_Type is array (Integer range <>) of Long_Float; > =A0 =A0 -- 1_048_343 causes segmentation fault, 1_048_342 =A0does not. > =A0 =A0 x : Float_Array_Type(1 .. 1_048_343); > begin > =A0 =A0 x(1) :=3D 1.0; > end bomb; > > Jerry Have you tried setting the stacksize in your shell. In bash the command is ulimit -s unlimited in csh, (I seem to recall): limit stacksize unlimited Type ulimit or limit to see what the defaults are. When I do it on Debian Linux, your program I get arrays up to 2 Gigabyte in size. HTH ... Jonathan