summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-11 07:52:13 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-11 07:52:13 +0000
commite959c8cdc3a24d24752dcaa5415bdd17153f98eb (patch)
treeb45b6d03b3ce6ff25666f5e71285905e2945c3b9 /gc.c
parent0819c287f2fccf49d6ffcdb515097612b771fffd (diff)
* 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 ]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15429 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 7403c413e3..275f9fc4aa 100644
--- a/gc.c
+++ b/gc.c
@@ -378,6 +378,9 @@ rb_newobj()
{
VALUE obj;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
+
if (!freelist) garbage_collect();
obj = (VALUE)freelist;