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: 103376,5bc4be576204aa20 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Tue, 15 Nov 2005 23:32:37 +0100 From: Georg Bauhaus Organization: future apps GmbH User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Buffer overflow Article - CACM References: <43783810.6080808@obry.net> <2jzfmy3kqhw9$.10by8ooz0jy1b.dlg@40tude.net> <4379ea6d$0$21945$9b4e6d93@newsread2.arcor-online.net> <15gzlx0mv4n2t$.1ono4o1ozibur.dlg@40tude.net> In-Reply-To: <15gzlx0mv4n2t$.1ono4o1ozibur.dlg@40tude.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <437a61d0$0$7421$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 15 Nov 2005 23:31:44 MET NNTP-Posting-Host: b0437037.newsread4.arcor-online.net X-Trace: DXC=i^ARb73j[g[50F7T5IO2 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:6410 Date: 2005-11-15T23:31:44+01:00 List-Id: Dmitry A. Kazakov wrote: > On Tue, 15 Nov 2005 15:03:11 +0100, Georg Bauhaus wrote: > > >>Dmitry A. Kazakov wrote: >> >> >>>Ada.Container. >>>They don't support safe iteration constructs "for I in X'Range loop". >> >>Ada.Container does provide safe iteration construct, be >>suitably defining and/or suggesting what is meant by "safe". >> >>OTOH, for I in X'Range loop alone doesn't imply that >>iteration will be safe. > > > As you said, it depends on the definition. Clearly it isn't safe against > shelling the computer. > For sure you can get Constrain_Error using the library, and this isn't alwas pleasant. Yet, in which ways is any of the following more safe than the other? for I in X'Range loop Modify_Element(X(I)); end loop; Iterate(X, Modify_Element'Access);