summaryrefslogtreecommitdiffstats
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
commit3bc70e6129aadce554380d0ed1205a288aebd34f (patch)
tree2d5b2829e56195b86b8c3e7b8430ba83fa051192
parent9f422a13f78fb3ed4390c5173e1348b81ca78a81 (diff)
downloadruby-3bc70e6129aadce554380d0ed1205a288aebd34f.tar.gz
ruby-3bc70e6129aadce554380d0ed1205a288aebd34f.tar.xz
ruby-3bc70e6129aadce554380d0ed1205a288aebd34f.zip
* gc.c (rb_newobj): prohibit call of rb_newobj() during gc.
a patch from Sylvain Joyeux in [ruby-core:12099]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--gc.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b14dfc56..327e4607e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 18 23:07:19 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * gc.c (rb_newobj): prohibit call of rb_newobj() during gc.
+ a patch from Sylvain Joyeux in [ruby-core:12099].
+
Wed Jun 18 21:08:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (verbose_setter, opt_W_getter): fixed prototypes.
diff --git a/gc.c b/gc.c
index 20af24f82..a888d659e 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++;