A bug with automatic variables and finally

Erik Schnetter erik.schnetter at student.uni-tuebingen.de
Fri May 2 02:24:29 PDT 1997

On Thu, 1 May 1997, Robert S. Thau wrote:

>   You mean asynchronous like one thread can generate an exception in
>   another?  Given this is the case how the hell do they write an 
>   to be atomic (I think they say they are somewhere)? 

What about catching such asynchronous exceptions only at special points,
such as (a) method invokations and (b) backward jumps?  This allows for
lots of optimizations, because all other places where exceptions can occur
(such as an integer division) are known.  Furthermore this ensures that
the code "checks for exceptions" reasonably often (at least once per

This would be the opposite of making atomic operations as small as
possible.  Make them as large as possible, make whole basic blocks atomic. 
Aren't most optimizations local to a basic block anyway? 

What remains is a good way to delay those asynchronous exceptions.  I'd
propose examining the code that the exception is thrown to, and putting in
some kind of breakpoints at the locations where it can be caught.  Those
breakpoints are removed after the exception has been caught.  This is of
course only a rough scheme.  Did anybody understand me? 


Erik Schnetter, erik.schnetter at student.uni-tuebingen.de

Arthur C. Clarke saw the future.
	He knew it would be run by huge computers.
		And he was right.		Just not about the size.

More information about the kaffe mailing list