PATCH: Clean up runtime initialization, fix stack trace bug
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Sun Aug 26 04:22:00 GMT 2001
This patch fixes a long-standing runtime bug on the mainline: uncaught
exceptions in the main thread will cause the runtime to abort due to
lack of a default exception handler. I've fixed this by changing the way
the first thread is started. A new interface for _Jv_AttachThread() is
added, which takes an unstarted thread object object as a parameter.
_Jv_RunMain now creates a gnu.gcj.runtime.FirstThread and passes it to
this. The same thread start up code can now be used for both attached
and regularly created threads, eliminating some code duplication. This
approach also has the advantage of localising much of the code relating
to looking up and calling main in FirstThread again. In addition, the
two entry points we previously had into the runtime, JvRunMain and
_Jv_RunMain, are now merged into one, with JvRunMain now a simple
wrapper around the other.
I'm checking this in.
regards
Bryce
More information about the Java-patches
mailing list