Bug in MLton exception handling?

Matthew Fluet fluet@CS.Cornell.EDU
Tue, 26 Mar 2002 13:14:59 -0500 (EST)


> The reason that my CeX3D Converter doesn't work before - seems a little
> tricky.
> I'm not sure yet - but I suspect that it might be a bug in MLton's
> exception handling
> or something. It is on a quite sophisticated piece of combinator parser
> code -
> and I think I might be able to make a small example which reproduces the
> problem for you... I will get back when I know more :)
> The problem occurs both when using the native and the gcc backends - so
> it
> shouldn't be in the backend (if indeed it turns out to be a bug...).

Could be.  Two of the major IR's have undergone substantial changes since
the last release; part of that included making exception handling more
explicit.  We don't know of any outstanding bugs, but I could imagine a
number of places where something strange might crop up (eg., any SSA
optimization that mistakenly rewrites a non-tail call that started with a
handler to one without a handler would result in code that "skips" a whole
exception handler).  I guess that's a good question to start with: is the
problem your seeing an exception not being handled at all, or an exception
being handled by the "wrong" handler.