comp.lang.ada
 help / color / mirror / Atom feed
* Bug in VMS Ada 3.0?
@ 1993-07-23  5:06 munnari.oz.au!comp.vuw.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon
  0 siblings, 0 replies; 3+ messages in thread
From: munnari.oz.au!comp.vuw.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon @ 1993-07-23  5:06 UTC (permalink / 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!"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in VMS Ada 3.0?
@ 1993-07-23 11:53 Wes Groleau X7574
  0 siblings, 0 replies; 3+ messages in thread
From: Wes Groleau X7574 @ 1993-07-23 11:53 UTC (permalink / raw)


In article <1993Jul23.180602.1@otago.ac.nz> simon@otago.ac.nz (The Arch-Deviant
) writes:
>(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:

(a) Check your news feed(s).  I saw several responses.

(b) Dampen your enthusiasm.  I found a bug in their Pascal compiler.  Their
problem report form would give writer's cramp if there were only one copy.
But in fact, there were so many carbons that after pressing as hard as I could,
I still had to turn to the middle sheet and trace over it to make the back
sheet show faint smudges.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in VMS Ada 3.0?
@ 1993-07-25  4:25 The Arch-Deviant
  0 siblings, 0 replies; 3+ messages in thread
From: The Arch-Deviant @ 1993-07-25  4:25 UTC (permalink / raw)


In article <CAM912.Czv@crdnns.crd.ge.com>, groleau@e7sa.crd.ge.com (Wes Groleau
 X7574) writes:
> (a) Check your news feed(s).  I saw several responses.

Sheepish apologies for clogging the group (at the moment I'm blaming news
but no doubt our sysmgr will disagree), and thanks to all those who replied
pointing out that compilers aren't required to catch such an erroneous
situation.

Simon Brady                     "I'd join the Movement,
University of Otago              If there was one I could believe in"
Dunedin, New Zealand                  - U2, 'Acrobat'

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1993-07-25  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-07-25  4:25 Bug in VMS Ada 3.0? The Arch-Deviant
  -- strict thread matches above, loose matches on Subject: below --
1993-07-23 11:53 Wes Groleau X7574
1993-07-23  5:06 munnari.oz.au!comp.vuw.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon

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