aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);