summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-30 05:42:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-30 05:42:34 +0000
commit4d846f2b8c68b976c9b241aec65b9ddae714f5e7 (patch)
treeba9a975b451aa5d3047ac2a9773fa18a216ab64f
parent2c9f22c2d02363c5634243dae4804e5fe4962183 (diff)
downloadruby-4d846f2b8c68b976c9b241aec65b9ddae714f5e7.tar.gz
ruby-4d846f2b8c68b976c9b241aec65b9ddae714f5e7.tar.xz
ruby-4d846f2b8c68b976c9b241aec65b9ddae714f5e7.zip
* gc.c (rb_newobj): prohibit call of rb_newobj() during gc when
USE_VALUE_CACHE is not defined (normal case). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--gc.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 089d34097..aed15cf97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 30 14:41:36 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * gc.c (rb_newobj): prohibit call of rb_newobj() during gc when
+ USE_VALUE_CACHE is not defined (normal case).
+
Mon Jun 30 10:28:33 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/syslog/syslog.c (syslog_write): syslog operations should be
diff --git a/gc.c b/gc.c
index 966aaa193..31c1547e3 100644
--- a/gc.c
+++ b/gc.c
@@ -732,6 +732,8 @@ rb_newobj(void)
return v;
#else
rb_objspace_t *objspace = &rb_objspace;
+ if (during_gc)
+ rb_bug("object allocation during garbage collection phase");
return rb_newobj_from_heap(objspace);
#endif
}