(j3.2006) (SC22WG5.5387) [ukfortran] Straw vote on draft DTS

N.M. Maclaren nmm1
Sun Dec 7 15:35:47 EST 2014

On Dec 7 2014, Bill Long wrote:
> There is substantial opinion that implementing stalled image recovery is 
> not easy. I do not disagree. In simplest terms, it is equivalent to 
> implementing the infrastructure to handle an exception handling 
> mechanism. It is a bit simpler - the handler is basically internal to the 
> runtime rather than user-specified, and if the relevant END TEAM 
> statement lacks a STAT= specifier, the code would end up aborting anyway, 
> so there is no need to do much before then. However, the basic process of 
> unwinding the call stack (if there is one) that grew after the CHANGE 
> TEAM statement execution is more or less the same as for an exception 
> handler. Given that exception handlers already exist in other languages, 
> and certainly at the system level, the argument that implementors do not 
> know how to do this seems weak at best. I understand grumbling about hard 
> work, not claims of inability.

I do not intend to start a debate on this matter, but need to correct
the above.  Yes, it is equivalent to exception handling (with the extra
complications of parallel data access), but for the case of system-
generated exceptions and the consequent undefined behaviour.  And it is
that which has been tackled many times over the past half-century, has
failed in every case I have seen, and where my experience lay.

Recovering from 'clean' exceptions caused by an explicit, programmed
raise/throw/etc. statement are trivial by comparison, and it is only
those that have been specified in any language or environment that I
have ever seen.  Certainly including C, C++, Ada and Python - and, for
that matter, all of the operating system exception handling interfaces
that I have seen.  In all other cases, they have specified the API
(i.e. the syntax) and left the semantics undefined.

If there is ANY example of specifying recovery from general, system
generated exceptions of the sort that trigger undefined behaviour, I
have never seen it.

Nick Maclaren.

More information about the J3 mailing list