comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: A simple ADA puzzle (I haven't the answer)
Date: Tue, 29 Jun 2004 11:32:38 +0200
Date: 2004-06-29T11:32:38+02:00	[thread overview]
Message-ID: <lmxpjfq0f1wq$.58zpkhc78ocd.dlg@40tude.net> (raw)
In-Reply-To: zd-dneTS0MFQL33dRVn-hA@megapath.net

On Mon, 28 Jun 2004 19:08:04 -0500, Randy Brukardt wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
> news:pan.2004.06.26.07.41.42.776463@dmitry-kazakov.de...
>> On Fri, 25 Jun 2004 12:37:20 -0500, Randy Brukardt wrote:
>>> If you creating dangling pointers with Unchecked_Conversion or with
>>> 'Unchecked_Access, and the dangling pointer is dereferenced, your
> program is
>>> erroneous. Nothing new there.
>>
>> Well, there are shades of being erroneous. Probably, because accessibility
>> checks were undiscriminating, 'Unchecked_Access managed to become almost a
>> decent citizen. It seems that now 'Unchecked_Access will be less
>> necessary, but more dangerous. Bad news for those lazy, who accustomed to
>> type it automatically instead of 'Access.
> 
> I don't follow. It's going to be just as necessary, because the usual use is
> to use it inside of a subprogram to put an object on a global chain. Even if
> the object is known to be global, or finalization cleans up properly (as in
> Claw), it still fails the accessibility check.
> 
> Similarly, the creation of dangling pointers isn't new. And it could hardly
> get more dangerous than dereferencing a dangling pointer and writing over
> someone else's memory - which can happen with any dangling pointer.

New is creation of dangling pointers in/to a dispatching table. Provided
that no tag checks are made.

Alternatively to tag checks one could patch the dispatching table by
throwing out all overridings happened in the scope. However then, one will
be able to dispatch to an abstract subprogram, much like in C++. Also this
would lead to memory leaks, if out-of-use dispatching tables are not
removed. Seems like no runner.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2004-06-29  9:32 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-16 15:40 A simple ADA puzzle (I haven't the answer) Abby
2004-06-16 16:21 ` Frank J. Lhota
2004-06-16 16:26   ` Abby
2004-06-16 17:01     ` Frank J. Lhota
2004-06-16 17:18       ` Martin Krischik
2004-06-17  6:57         ` Brian May
2004-06-17 12:44         ` Frank J. Lhota
2004-06-16 17:58     ` Jeffrey Carter
2004-06-23 21:14       ` Randy Brukardt
2004-06-16 19:51     ` Simon Wright
2004-06-16 17:56   ` Jeffrey Carter
2004-06-16 22:25     ` Martin Dowie
2004-06-17  0:41       ` Jeffrey Carter
2004-06-17  7:45         ` Martin Dowie
2004-06-17 14:20     ` Frank J. Lhota
2004-06-18 18:07     ` Wojtek Narczynski
2004-06-18 18:37       ` Frank J. Lhota
2004-06-19  2:11         ` Brian May
2004-06-19 11:25         ` Wojtek Narczynski
2004-06-19  1:27       ` Jeffrey Carter
2004-06-19 11:17         ` Wojtek Narczynski
2004-06-16 18:31   ` Hyman Rosen
2004-06-16 20:16     ` Frank J. Lhota
2004-06-16 21:05       ` Hyman Rosen
2004-06-17 13:26         ` Frank J. Lhota
2004-06-17 14:19           ` Hyman Rosen
2004-06-17 15:24             ` Frank J. Lhota
2004-06-23 21:27               ` Randy Brukardt
2004-06-17 19:17           ` Georg Bauhaus
2004-06-16 22:48     ` Alexander E. Kopilovich
2004-06-17 10:25       ` Björn Persson
2004-06-17 14:33         ` Frank J. Lhota
2004-06-17 23:15           ` Alexander E. Kopilovich
2004-06-23 21:30           ` Randy Brukardt
2004-06-17  8:06     ` Dmitry A. Kazakov
2004-06-17 12:19       ` Hyman Rosen
2004-06-17 14:16         ` Dmitry A. Kazakov
2004-06-17 14:17           ` Hyman Rosen
2004-06-17 22:51           ` Brian May
2004-06-18  7:50             ` Dmitry A. Kazakov
2004-06-18 12:32               ` Hyman Rosen
2004-06-18  9:14           ` Ole-Hjalmar Kristensen
2004-06-18 12:24             ` Hyman Rosen
2004-06-18 12:41             ` Dmitry A. Kazakov
2004-06-18 13:16               ` Hyman Rosen
2004-06-18 14:01                 ` Dmitry A. Kazakov
2004-06-18 16:14                   ` Hyman Rosen
2004-06-19  9:31                     ` Dmitry A. Kazakov
2004-06-21  3:30                       ` Hyman Rosen
2004-06-21  8:16                         ` Dmitry A. Kazakov
2004-06-21 16:32                           ` Hyman Rosen
2004-06-22  2:19                             ` David Starner
2004-06-22 13:03                               ` Frank J. Lhota
2004-06-23 21:37                           ` Randy Brukardt
2004-06-24  8:39                             ` Dmitry A. Kazakov
2004-06-24 20:53                               ` Randy Brukardt
2004-06-25  8:24                                 ` Dmitry A. Kazakov
2004-06-25 17:37                                   ` Randy Brukardt
2004-06-26  7:55                                     ` Dmitry A. Kazakov
2004-06-29  0:08                                       ` Randy Brukardt
2004-06-29  9:32                                         ` Dmitry A. Kazakov [this message]
2004-06-29 18:36                                           ` Randy Brukardt
2004-06-23 21:21     ` Randy Brukardt
2004-06-24  1:03       ` Jeffrey Carter
2004-06-24 15:19       ` Frank J. Lhota
2004-06-24 16:04         ` Ed Falis
2004-06-24 21:04           ` Randy Brukardt
2004-06-25 15:30             ` Frank J. Lhota
2004-06-25 18:16               ` Bob Spooner
2004-06-25 19:23                 ` Frank J. Lhota
2004-06-26 15:26                   ` Robert I. Eachus
2004-06-28  4:52                     ` Steve
2004-07-04 19:06                       ` Robert I. Eachus
2004-06-29  0:03                 ` Randy Brukardt
2004-06-24 21:00         ` Randy Brukardt
2004-06-16 16:49 ` Martin Krischik
2004-06-17 10:58   ` Björn Persson
2004-06-17  3:48 ` Steve
2004-06-17 10:39   ` Björn Persson
  -- strict thread matches above, loose matches on Subject: below --
2004-06-17  8:38 Christoph Karl Walter Grein
2004-06-23 21:43 ` Randy Brukardt
replies disabled

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