comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Passing the same actual as both in and out formal parameters?
Date: Wed, 18 Nov 2009 11:00:46 +0100
Date: 2009-11-18T11:00:46+01:00	[thread overview]
Message-ID: <ikg0eh.2lj.ln@hunter.axlog.fr> (raw)
In-Reply-To: <a1e7b064-3afe-4a46-a0e4-0c89a4542076@j24g2000yqa.googlegroups.com>

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.
> 
<shameless_plug>
Or be automatically warned by AdaControl, see rule Parameter_Aliasing
</shameless_plug>

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  reply	other threads:[~2009-11-18 10:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17  9:50 Passing the same actual as both in and out formal parameters? Ludovic Brenta
2009-11-17 10:31 ` Jean-Pierre Rosen
2009-11-17 11:26   ` Ludovic Brenta
2009-11-17 13:13     ` Jean-Pierre Rosen
2009-11-17 16:07       ` Ludovic Brenta
2009-11-18 10:00         ` Jean-Pierre Rosen [this message]
2009-11-17 10:40 ` Niklas Holsti
2009-11-17 16:26 ` Adam Beneschan
2009-11-17 21:25   ` Randy Brukardt
2009-11-18  0:11     ` Jeffrey R. Carter
2009-11-18  0:23       ` Adam Beneschan
2009-11-18  3:47         ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox