[Numeric-interest] longjmp from signal handler

David Hough 754R work 754r at ucbtest.org
Tue Apr 29 13:55:24 PDT 2008


> Does anyone know of any numeric applications need this feature?
> Does anyone know of papers that discuss using signal / trap / exception
handlers for floating-point exceptions?


754R abandoned 754's trap specification (which sometimes was translated into
C signal handlers) in favor of specifications for alternate exception 
handling that was more portably useful for application programmers -
though the underlying implementation would not likely be portable at all.
But that's a problem for the system implementer rather than the application
programmer.   Since systems are often implemented in C, any revised C
specification might want to consider what would be required to implement
754R alternate exception handling.   signal/longjmp is certainly one kind of
mechanism to implment aynchronous control transfer.

The basic ideas of alternate exception handling were worked out in
the operating system for the Toronto 7094 in the 1960's and are discussed
in some notes on Kahan's lectures on Implementation of Algorithms 
in the early 1970's.     A later discussion of some of the relevant
features is in threads beginning at

http://mailman.oakapple.net/pipermail/numeric-interest/1991-October/000151.html
http://mailman.oakapple.net/pipermail/numeric-interest/1991-October/000152.html
http://mailman.oakapple.net/pipermail/numeric-interest/1991-October/000153.html

Here are some even later discussions from 754R development:

http://754r.ucbtest.org/proposals/alternate-exceptions/alternate-exceptions.pdf
http://754r.ucbtest.org/ballots-2005/withdrawn/alternate-exceptions.pdf

The purple text illustrates some syntax and semantics ideas in a 
hypothetical language not unlike C.

The underlying implementations would encompass rather machine-dependent
software and as much hardware support as deemed necessary for performance.
That in turn depends circularly on the extent to which alternate exception
handling is adopted by languages and then by application programmers and
then by benchmarkers.



More information about the Numeric-interest mailing list