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,124905131f269735 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-27 10:47:46 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!148.122.208.68!news2.oke.nextra.no!nextra.com!news1.oke.nextra.no.POSTED!not-for-mail Sender: erjohann@rask.void.nil Newsgroups: comp.lang.ada Subject: Re: gnat and heap size References: <1001442590.557811@news.drenet.dnd.ca> <3BB10E2C.8C57FFE1@linuxchip.demon.co.uk> <3BB32939.AFB47378@Physik.Uni-Magdeburg.DE> From: erij@online.no Organization: Bzzt Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 213.145.178.31 X-Complaints-To: news-abuse@nextra.no NNTP-Posting-Date: Thu, 27 Sep 2001 19:47:45 MET DST X-Trace: readme.online.no 1001612865 213.145.178.31 Date: 27 Sep 2001 19:48:18 +0200 Xref: archiver1.google.com comp.lang.ada:13441 Date: 2001-09-27T19:48:18+02:00 List-Id: Gerald Kasner writes: > > > > > Compiled with gnat-3.14a1 on sparc-solaris2.6 I get: > > > > ./matrix > > > Found 42 at index 42 in b > > > > And in this example the array bounds for b can be overwritten as well > > (since they are stored right before the first array element). > > > > RedHat Linux 6.2 on a sparc sun 4 ultra, gnat 3.12p : > > No output. The output of this program will depend on the heap layout of the particular os you are running on. By increasing the size of b (to a few thousand) and adding a few thousand to the index in a I write to I was able to reproduce the output in linux-x86 with gnat 3.13p as well. -Erik -- /d{def}def/m{mul}d/a{add}d/q{repeat}d/y 1 d 300{/x 1 d 600{/c x 600 div 4 m 2 sub d/z y 300 div 2 m 1 sub d/r 0 d/i 0 d/t 0 d{t 1 le{/n r r m i i m sub c a d/b 2 r m i m z a d/r n d/i b d r r m i i m a 16 gt{exit}if} {exit}ifelse/t t .01 a d}loop t setgray x y moveto 1 1 rlineto stroke/x x 1 a d}q /y y 1 a d}q