summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-18 14:09:33 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-18 14:09:33 +0000
commit87d053f0002ebf9a3927412a85ea0a09bd06f705 (patch)
tree2d5b2829e56195b86b8c3e7b8430ba83fa051192 /gc.c
parent29ad22694f6f105de4d0322548d6551ecdadbb26 (diff)
* gc.c (rb_newobj): prohibit call of rb_newobj() during gc.
a patch from Sylvain Joyeux in [ruby-core:12099]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 20af24f82d..a888d659e3 100644
--- a/gc.c
+++ b/gc.c
@@ -714,6 +714,9 @@ rb_newobj(void)
rb_objspace_t *objspace = &rb_objspace;
#endif
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (v) {
RBASIC(v)->flags = 0;
th->value_cache_ptr++;