summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-05 14:28:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-05 14:28:00 +0000
commit30be8467ce6826970dae5e1b4a5d279862109e46 (patch)
treeaa3c166d9793d3d36bd75e4fbab1056130cec685
parentc79ef69302fa52559c00186d80e9ef97250ebb3a (diff)
* eval.c (rb_thread_save_context): must not switch contexts during
re-allocating stack. fixed: [ruby-core:05219] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f1d9c8bd5..937459e667 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
-Tue Jul 5 23:23:09 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 5 23:27:14 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (sort_2): get rid of yet another bcc's bug.
fixed: [ruby-core:05152]
+ * eval.c (rb_thread_save_context): must not switch contexts during
+ re-allocating stack. fixed: [ruby-core:05219]
+
Tue Jul 5 15:15:10 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/tkutil.c: fix typo.
diff --git a/eval.c b/eval.c
index d5529f08b4..4f843e24e7 100644
--- a/eval.c
+++ b/eval.c
@@ -9971,7 +9971,9 @@ rb_thread_save_context(th)
th->stk_len = 0;
th->stk_pos = pos;
if (len > th->stk_max) {
- REALLOC_N(th->stk_ptr, VALUE, len);
+ VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
+ if (!ptr) rb_memerror();
+ th->stk_ptr = ptr;
th->stk_max = len;
}
th->stk_len = len;