Xiao-Feng Li - 2001-08-23

Logged In: YES
user_id=202559

Yes this is a problem with p_thr->app_status transition.
It turns out that during orp initialization p_thr-
>app_status == thread_is_birthing until after the static
initializer has run. This is inconsistent since the thread
is, of course, running the initializer so should instead be
in the state thread_is_running.

I tried to fix the bug by putting p_thr->app_status ==
thread_is_running; in orp_thread_init(). But then I hit
the following warning message code in orp_enable_gc().
Perhaps a new app_status enum state needs to be added
called main_thread_is_birthing. Also add the correct logic
to the below code.

if (the_ljf == 0) {
// If "ljf" is zero, the thread had better
be "birthing" or "dying".
if (!((p_thr->app_status == thread_is_dying) ||
(p_thr->app_status == thread_is_birthing)) ||
(p_thr->throw_context != NULL)) {
// We could be compiling main so there won't be
an ljf
if (print_bug_not_done) {
orp_cout << "*** BUG *** - orp_enable_gc:
p_thr->last_java_frame is 0 and p_thr->app_status is " \ << p_thr->app_status;

Weldon