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,4c3a05831e6a0733 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-11 05:09:05 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3AD43B2E.D5623C8D@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Stack size with GNAT for Windows References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 11 Apr 2001 12:05:41 GMT NNTP-Posting-Host: 158.252.122.229 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 986990741 158.252.122.229 (Wed, 11 Apr 2001 05:05:41 PDT) NNTP-Posting-Date: Wed, 11 Apr 2001 05:05:41 PDT X-Received-Date: Wed, 11 Apr 2001 05:04:26 PDT (newsmaster1.prod.itd.earthlink.net) Xref: supernews.google.com comp.lang.ada:6747 Date: 2001-04-11T12:05:41+00:00 List-Id: gautier@club.lemonde.fr wrote: > > Hello. Sorry for the banal question, but is there > a mean to increase the stack size with GNAT (3.13p) > for Windows ? I obtain a stack overflow in a numerics > program for a middle-sized problem, with all big data > taken on heap (via New), this when entering a procedure > with only 3 integer as local variables. So, I suspect > a bug, but would like to test a bit before sending a bug > report. Of course I have searched through the GNAT user's > guide and what remains of Deja News. With only 3 integer local variables, it would seem stack size is only part of the story. I ran into a similar problem, though, with the 3.13 series (a, b1, b2) of GNAT on HP-UX. The characteristics of the procedures in which the problem occurred usually involved either large aggregate assignements (meaning the data item itself was quite large) or calling a function whose return type was a large data structure. Presumably the stack is employed as an intermediary when doing these assignments, and so caused the overflow. This problem was reported to ACT, as we were a supported customer, and I _believe_ fixes went into the 3.14 series, of which there is not yet a public version. In the meantime, if your procedure does show characteristics like I described, the way we worked around the problems was by breaking large aggregate assignments into a series of component assignments, and by converting the functions into procedures that returned data via an "out" or "in out" parameter. On the other hand, if your procedure doesn't have those characteristics, analyze it to see what other kind of construct may be in it that might reasonably be expected to require a large amount of intermediate storage. Good luck, Marc A. Criley Senior Staff Engineer Quadrus Corporation www.quadruscorp.com