From 432ec4f2c4fdae76c2ff161b15eabe84f5b27e6a Mon Sep 17 00:00:00 2001 From: shyouhei Date: Fri, 13 Jun 2008 04:12:35 +0000 Subject: merge revision(s) 15429, 15471: * gc.c (rb_newobj): prohibit call of rb_newobj() during gc. Submitted by Sylvain Joyeux [ruby-core:12099]. * ext/dl/ptr.c: do not use LONG2NUM() inside dlptr_free(). Slightly modified fix bassed on a patch by Sylvain Joyeux [ruby-core:12099] [ ruby-bugs-11859 ] [ ruby-bugs-11882 ] [ ruby-patches-13151 ]. * ext/dl/ptr.c (dlmem_each_i): typo fixed. a patch from IKOMA Yoshiki in [ruby-dev:33776]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 996713ef19..00d55666a3 100644 --- a/gc.c +++ b/gc.c @@ -392,6 +392,9 @@ rb_newobj() { VALUE obj; + if (during_gc) + rb_bug("object allocation during garbage collection phase"); + if (!freelist) garbage_collect(); obj = (VALUE)freelist; -- cgit v1.2.3