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 | b55aabf9f78ae47fb3702c926843642467581167 (patch) | |
tree | 9b603579caead97f8033b4f1a47b85c0172b51dd /eval.c | |
parent | 1e63fcd6eb1f9d5bcda47cf19bc7be3a88bd43e0 (diff) | |
download | ruby-b55aabf9f78ae47fb3702c926843642467581167.tar.gz ruby-b55aabf9f78ae47fb3702c926843642467581167.tar.xz ruby-b55aabf9f78ae47fb3702c926843642467581167.zip |
* eval.c (rb_thread_save_context): must not switch contexts during
re-allocating stack. fixed: [ruby-core:05219]
git-svn-id: http://svn.ruby-lang.org/repos/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; |