[前][次][番号順一覧][スレッド一覧]

ruby-changes:31239

From: ko1 <ko1@a...>
Date: Thu, 17 Oct 2013 08:09:47 +0900 (JST)
Subject: [ruby-changes:31239] ko1:r43318 (trunk): * ext/objspace/object_tracing.c (newobj_i): add workaround.

ko1	2013-10-17 08:09:41 +0900 (Thu, 17 Oct 2013)

  New Revision: 43318

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43318

  Log:
    * ext/objspace/object_tracing.c (newobj_i): add workaround.
      some bugs hits this check.
    * ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer.

  Modified files:
    trunk/ChangeLog
    trunk/ext/objspace/object_tracing.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43317)
+++ ChangeLog	(revision 43318)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Oct 17 08:08:11 2013  Koichi Sasada  <ko1@a...>
+
+	* ext/objspace/object_tracing.c (newobj_i): add workaround.
+	  some bugs hits this check.
+
+	* ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer.
+
 Thu Oct 17 07:36:53 2013  Eric Hodel  <drbrain@s...>
 
 	* lib/rubygems:  Update to RubyGems master 2abce58.  Changes:
Index: ext/objspace/object_tracing.c
===================================================================
--- ext/objspace/object_tracing.c	(revision 43317)
+++ ext/objspace/object_tracing.c	(revision 43318)
@@ -99,7 +99,7 @@ newobj_i(VALUE tpval, void *data) https://github.com/ruby/ruby/blob/trunk/ext/objspace/object_tracing.c#L99
     const char *class_path_cstr = RTEST(class_path) ? make_unique_str(arg->str_table, RSTRING_PTR(class_path), RSTRING_LEN(class_path)) : 0;
 
     if (arg->keep_remains && st_lookup(arg->object_table, (st_data_t)obj, (st_data_t *)&info)) {
-	if (info->living) rb_bug("newobj_i: reuse living object: %p", (void *)obj);
+	if (0 /* workaround */) if (info->living) rb_bug("newobj_i: reuse living object: %p", (void *)obj);
 	delete_unique_str(arg->str_table, info->path);
 	delete_unique_str(arg->str_table, info->class_path);
     }
@@ -294,7 +294,7 @@ object_allocations_reporter_i(st_data_t https://github.com/ruby/ruby/blob/trunk/ext/objspace/object_tracing.c#L294
 
     fprintf(out, "-- %p (%s F: %p, ", (void *)obj, info->living ? "live" : "dead", (void *)info->flags);
     if (info->class_path) fprintf(out, "C: %s", info->class_path);
-    else                  fprintf(out, "C: %p", info->klass);
+    else                  fprintf(out, "C: %p", (void *)info->klass);
     fprintf(out, "@%s:%lu", info->path ? info->path : "", info->line);
     if (!NIL_P(info->mid)) fprintf(out, " (%s)", rb_id2name(SYM2ID(info->mid)));
     fprintf(out, ")\n");

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]