aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-24 05:30:27 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-24 05:30:27 +0000
commit13b2763ca5fb7ab8715a7cdb97c960b9f0679fb9 (patch)
tree8e7749ff3ddd1f02427c93fd1b0b3b4def88b238
parent3cd048126ee3cc86eeb59946399169890105dd21 (diff)
downloadruby-13b2763ca5fb7ab8715a7cdb97c960b9f0679fb9.tar.gz
* gc.c (gc_mark_ptr): add a check code for #11244.
It should be removed later. But we can remain this check because it is only a branch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--gc.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index da800f3a4e..54022f2744 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Jun 24 14:25:17 2015 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (gc_mark_ptr): add a check code for #11244.
+
+ It should be removed later. But we can remain this check
+ because it is only a branch.
+
Wed Jun 24 12:49:11 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* string.c (rb_fstring_cstr): new function to make a fstring from
diff --git a/gc.c b/gc.c
index dd3d70c3ef..9b1870276c 100644
--- a/gc.c
+++ b/gc.c
@@ -4193,6 +4193,10 @@ gc_mark_ptr(rb_objspace_t *objspace, VALUE obj)
{
if (LIKELY(objspace->mark_func_data == NULL)) {
rgengc_check_relation(objspace, obj);
+
+ /* check code for Bug #11244 */
+ if (BUILTIN_TYPE(obj) == T_NONE) rb_bug("gc_mark_ptr: obj is T_NONE");
+
if (!gc_mark_set(objspace, obj)) return; /* already marked */
gc_aging(objspace, obj);
gc_grey(objspace, obj);