stack overflow interacts poorly with classloaders
Patrick Tullmann
kaffe@rufus.w3.org
Mon, 12 Jun 2000 17:48:01 -0600
Tim Stack wrote:
> Preloading in this case means checking if a class references
> StackOverflowError or any of its ancestors and then having the class
> loader load them in, or we just treat them as "special classes" that
> magically resolve to system classes regardless of the class loader.
I'm not sure if that's sufficient. For example this code:
...
try {
wasteLotsofStackSpace();
} catch (SomeAppSpecificException i) {
...
}
...
may still invoke the ClassLoader and call out into Java code in the
exception dispatching path.
The problem is really that the exception dispatch path may wander out
into arbitrary Java code (via loadClass()).
It seems to me that the solution is to make sure that all Class names
referenced in a catch clause are resolved before any code in the
corresponding try block is executed. Can we just get away with making
sure all class names referenced in a catch block are resolved when the
method is compiled?
-Pat
----- ----- ---- --- --- -- - - - - -
Pat Tullmann tullmann@cs.utah.edu
Research is not just an adventure, its a job.