diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-05 14:28:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-05 14:28:00 +0000 |
commit | a327eb95d9d82d255be1f2bcb152d5f6b6199767 (patch) | |
tree | 9b603579caead97f8033b4f1a47b85c0172b51dd /eval.c | |
parent | 11921b18612a92894f33a64e14dc5670c1cff6b4 (diff) | |
download | ruby-a327eb95d9d82d255be1f2bcb152d5f6b6199767.tar.gz |
* 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/trunk@8726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -10329,7 +10329,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; |