summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 24867d32779..feecfbd4b78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 20 18:59:54 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * eval.c (rb_thread_save_context): prohibit rb_gc_force_recycle()
+ on thread saved ruby_dyna_vars. [ruby-dev:20236]
+
Tue May 20 17:39:15 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* object.c (init_copy): call initialize_copy at the end of copy
diff --git a/eval.c b/eval.c
index 3d8bb69a45b..f7bc8d2c1f5 100644
--- a/eval.c
+++ b/eval.c
@@ -7982,6 +7982,7 @@ rb_thread_save_context(th)
th->stk_pos = (rb_gc_stack_start<pos)?rb_gc_stack_start
:rb_gc_stack_start - len;
if (len > th->stk_max) {
+ rb_gc();
REALLOC_N(th->stk_ptr, VALUE, len);
th->stk_max = len;
}
@@ -7998,6 +7999,7 @@ rb_thread_save_context(th)
th->wrapper = ruby_wrapper;
th->cref = ruby_cref;
th->dyna_vars = ruby_dyna_vars;
+ FL_SET(ruby_dyna_vars, DVAR_DONT_RECYCLE);
th->block = ruby_block;
th->flags &= THREAD_FLAGS_MASK;
th->flags |= (rb_trap_immediate<<8) | scope_vmode;