diff --git a/ChangeLog b/ChangeLog index 9b14dfc566..327e4607e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 18 23:07:19 2008 URABE Shyouhei + + * 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 * ruby.c (verbose_setter, opt_W_getter): fixed prototypes. 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++;