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 Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Passing the same actual as both in and out formal parameters? Date: Wed, 18 Nov 2009 11:00:46 +0100 Organization: Adalog Message-ID: References: <1fbe454c-52b0-408b-9159-982fc019a53c@j19g2000yqk.googlegroups.com> <81utdh.otp.ln@hunter.axlog.fr> <044632e0-e40c-4c47-ab56-189f4ae0c15b@u7g2000yqm.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1258539330 10328 195.25.228.57 (18 Nov 2009 10:15:30 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 18 Nov 2009 10:15:30 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:8140 Date: 2009-11-18T11:00:46+01:00 List-Id: Ludovic Brenta a �crit : [...] > Triggering the bug requires: > > (1) pass-by-reference type (i.e. tagged, limited, etc.) or explicit > access type > (2) same object passed twice as both in and out parameters > (3) non-atomic reads and writes to the object inside the subprogram > > When writing such a procedure, it is necessary to pay attention: > either prevent the bug by checking for condition (2) and raising an > exception if it is met; use only atomic operations so as to prevent > (3); or accept that the bug may happen and warn about it. > Or be automatically warned by AdaControl, see rule Parameter_Aliasing -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr