summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-20 10:02:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-20 10:02:06 +0000
commitbec6d3b1b9a5fcc4ed37c98814e114066cfcc0a5 (patch)
tree417b41b1ba1689e744d4b6e7936c00bfabb5c8a6
parent56a4cc27edbe89dc65147a6a5f667cb838cfabc3 (diff)
* eval.c (rb_thread_save_context): prohibit rb_gc_force_recycle()
on thread saved ruby_dyna_vars. [ruby-dev:20236] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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;