From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Accessing finalized values
Date: Fri, 3 May 2013 17:36:08 -0500
Date: 2013-05-03T17:36:08-05:00 [thread overview]
Message-ID: <km1e4q$j98$1@munin.nbi.dk> (raw)
In-Reply-To: 143a8db3-c14b-4983-a481-4b998aea42af@googlegroups.com
<sbelmont700@gmail.com> wrote in message
news:143a8db3-c14b-4983-a481-4b998aea42af@googlegroups.com...
>Does anyone have any insight into what happens if a program uses the value
>of an object after it has been finalized, but before it ceases to exist?
Nothing special (other than protected objects, as Adam notes). This is
perfectly legitimate, although arguably pathological. One reason is that it
is legal for Finalize to be called on the same object more than once in
unusual circumstances (this does not necessarily represent a compiler bug).
Moreover, Finalize routines often depend on other data in the program, and
that data might already be finalized (imagine the final finalization of a
program that's completed). It would be hard to get everything into an order
where there was no dependence on things that are already finalized. (This
sort of thing can happen in Claw programs, for instance.) The protected
object case is a bounded error simply because too many implementations
simply crashed in that case (early versions of GNAT did that, it was
horrible trying to figure out why Claw programs wouldn't terminate
properly - the problem was actually our design bug, but its not helpful to
report a bug with a GP fault in the runtime). Making it a bounded error
makes it clear that's not an acceptable implementation. The reference to
"production code" in AARM 9.4(20.h/2) is talking about the locking used in
Claw - which should be obvious from the naming used in the following
example.
Randy.
next prev parent reply other threads:[~2013-05-03 22:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 21:00 Accessing finalized values sbelmont700
2013-05-02 22:47 ` Adam Beneschan
2013-05-03 22:36 ` Randy Brukardt [this message]
2013-05-05 15:00 ` sbelmont700
2013-05-06 5:45 ` J-P. Rosen
2013-05-06 8:59 ` Stephen Leake
2013-05-06 9:52 ` Dmitry A. Kazakov
2013-05-06 20:05 ` sbelmont700
2013-05-07 0:51 ` 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