comp.lang.ada
 help / color / mirror / Atom feed
From: munnari.oz.au!comp.vuw.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon@uune t.uu.net  (The Arch-Deviant)
Subject: Bug in VMS Ada 3.0?
Date: 23 Jul 93 05:06:02 GMT	[thread overview]
Message-ID: <1993Jul23.180602.1@otago.ac.nz> (raw)

(This was asked a while ago but didn't receive any response. I'm trying
again on the grounds that (a) if it is a bug it seems quite a biggie and
(b) I'm looking forwards to hitting DEC with a problem report if I can :-) )

VMS Ada 3.0 appears not to perform range-checking when separate subunits
make use of global variables. Consider the following example:

   procedure Foo is
      subtype I_Range is integer range 1..10;
      A: array( I_Range ) of integer;
      I: I_Range;
      procedure Bar is separate;
   begin
      Bar;        -- Bar contains something like "A(I) := 0"
   end Foo;

The compiler does not generate any range-checking code in Bar, so that proc
will blindly write to whatever random memory location the unitialised index
I happens to point to, even if it is outside I_Range. If Bar is in the same
file then CONSTRAINT_ERROR will be raised as expected. My understanding
was that the program should perform equivalently regardless of which subunits
are in separate files. Am I missing something or have DEC made a mistake?
(And if the latter how the heck did this get past certification?)

Thanks...
 
Simon Brady                "So go ahead, put us down
University of Otago         The time will come when we turn it around
Dunedin, New Zealand        Won't be long, mark my words
                            The time will come for revenge of the nerds!"

             reply	other threads:[~1993-07-23  5:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-23  5:06 munnari.oz.au!comp.vuw.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-07-23 11:53 Bug in VMS Ada 3.0? Wes Groleau X7574
1993-07-25  4:25 The Arch-Deviant
replies disabled

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