From: paul@cernvax.UUCP (paul)
Subject: A Bug in Vax-Ada? (ACCVIO)
Date: 17 Dec 87 09:15:36 GMT [thread overview]
Message-ID: <585@cernvax.UUCP> (raw)
<<< DISK$SYSTEM:[NOTES$LIBRARY]ADA.NOTE;1 >>>
-< Ada >-
================================================================================
Note 12.0 A bug in Vax Ada compiler... No replies
20514::LOUBOUTIN "Sylvain R.Y. (47 27 37)" 58 lines 14-DEC-1987 18:26
--------------------------------------------------------------------------------
A bug in Vax Ada compiler ?
---------------------------
just have a look at that short procedure:
with UNCHECKED_DEALLOCATION;
with TEXT_IO;
procedure G_ADA_BUG is
type ACCESS_STRING is access STRING;
procedure DISPOSE is new UNCHECKED_DEALLOCATION (STRING, ACCESS_STRING);
A: ACCESS_STRING := new STRING'("Ceci est un exemple...");
B: constant STRING := A.all;
begin -- G_ADA_BUG
TEXT_IO.PUT_LINE (A.all);
TEXT_IO.PUT_LINE (B);
DISPOSE (A);
TEXT_IO.PUT_LINE (B);
end G_ADA_BUG;
I have compiled (with default options) it with Vax Ada V1.4-33
running under Vax/Vms V4.5 on a Vax-8600.
The expected result is:
Ceci est un exemple...
Ceci est un exemple...
Ceci est un exemple...
But I got it:
Ceci est un exemple...
Ceci est un exemple...
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=7FF3EA00, PC=00013FF3, PSL=0BC00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name routine name line rel PC abs PC
00013FF3 00013FF3
000138B0 000138B0
000138E6 000138E6
G_ADA_BUG G_ADA_BUG 21 000001EC 00000AD9
ADA$ELAB_G_ADA_ ADA$ELAB_G_ADA_BUG 00000009 00000809
00000B38 00000B38
0000D1F2 0000D1F2
ADA$ELAB_G_ADA_ ADA$ELAB_G_ADA_BUG 0000001B 0000081B
00000B13 00000B13
This program behaves like if it was written like this:
...
A: ACCESS_STRING := new STRING'("Ceci est un exemple...");
B: STRING renames A.all;
...
It is quit dangerous, isn'it ?
SRYL
reply other threads:[~1987-12-17 9:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox