RE: JavaMemoryModel: Re: Java Memory Model and exceptions ?

From: Roly Perera (roly.perera@ergnosis.com)
Date: Wed Aug 22 2001 - 13:23:37 EDT


Cliff Crick wrote:

> Bill Pugh wrote:
>
> > A related question that I would like some input on from people on
the
> > list: are Errors guaranteed to be precise? What if the JVM throws an

> > InternalError or StackOverflowError? Is it required to be the case
that
> > there exists some point in the original program such that all writes

> > before that point were committed and no writes after that point are
> > performed? What implementation strategies do JVMs use to handle
this?
>
> Sun's certainly gone to some length to make sure StackOverflowError
> appears to be thrown at some particular point. InternalErrors are
> never thrown because we don't have recoverable errors; i.e. the VM
> crashes instead. :-)

The JLS (in 11.3.1 and 11.3.2) requires precision for all Errors, even
InternalError, which is the only asynchronous Error which can be thrown
by the VM. (A side issue is that there is *no* apparent circumstance
under which UnknownError can be thrown, unless it is perhaps intended to
be a synchronous form of InternalError.)

See also the second topic under:

http://www.ergnosis.com/java-spec-report/java-language/chapter-11.html

Roly Perera
roly.perera@ergnosis.com
+44 7733 264212 (mobile)

+------------------------------------------------------------------+
+ Ergnosis Ltd www.ergnosis.com +
+ Unit 6 +
+ 14 Kings Square +
+ Bristol BS2 8JH, U.K. +
+ +44 117 944 5983 (telephone) Java Spec Report: +
+ +44 870 124 5728 (fax) www.ergnosis.com/java-spec-report +
+------------------------------------------------------------------+

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:34 EDT