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: a07f3367d7,aa14979d20ba3045 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 11 May 2009 12:38:22 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Allocation question References: <4a07fc7a$0$2855$ba620e4c@news.skynet.be> In-Reply-To: <4a07fc7a$0$2855$ba620e4c@news.skynet.be> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a08001f$0$30233$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 11 May 2009 12:38:23 CEST NNTP-Posting-Host: 09ea3688.newsspool1.arcor-online.net X-Trace: DXC=:\b>B]1JgSof1oJaJ0@dmgic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbi>Bg_PWGoIhc;9OJDO8_SKfNSZ1n^B98ijcHQB5U:2`Wa X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5752 Date: 2009-05-11T12:38:23+02:00 List-Id: Olivier Scalbert schrieb: > --------------------------------------------------- > -- test > --------------------------------------------------- > with Image; > use Image; > > procedure Test_Image is > Image : Image_T(1..100, 1..100); > FillColor : constant Color_T := (0, 0, 0); > begin > Fill(Image, FillColor); > end Test_Image; > > > This program seems to work. > However when I increase the size of Image, I get a Segmentation fault. > > Should I need to play with access type and allocation stuff ? Access types won't be necessary, in principle. Asssuming you are using GNAT with standard options, suitable compiler switches might solve the problem. (IIRC, it has to do with recent GCC policies that assume small data structures on the stack for reasons unrelated to Ada, and then stack checking.) Be sure to turn on -gnato and -fstack-check when you want to run GNAT in Ada mode.