diff --git a/ChangeLog b/ChangeLog index 7f9603f859..ebc94669a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 9 23:50:21 2003 Nobuyoshi Nakada + + * eval.c (rb_thread_start_0): prevent thread from GC. + [ruby-dev:21572] + Thu Oct 9 19:11:44 2003 Nobuyoshi Nakada * eval.c (rb_thread_start_0): non-volatile should be restored from diff --git a/eval.c b/eval.c index 033134cb38..8fb1ac6a56 100644 --- a/eval.c +++ b/eval.c @@ -9385,6 +9385,7 @@ rb_thread_start_0(fn, arg, th) rb_thread_t th; { volatile rb_thread_t th_save = th; + volatile VALUE thread = th->thread; struct BLOCK *volatile saved_block = 0, *block; enum thread_status status; int state; @@ -9408,7 +9409,7 @@ rb_thread_start_0(fn, arg, th) #endif if (THREAD_SAVE_CONTEXT(curr_thread)) { - return th_save->thread; + return thread; } if (ruby_block) { /* should nail down higher blocks */