https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112012-12-23T21:57:56ZRuby Issue Tracking SystemRuby master - Bug #7607: TypeError: invalid inspect_tbl pair_list on Windows 8https://bugs.ruby-lang.org/issues/7607?journal_id=350282012-12-23T21:57:56Zphasis68 (Heesob Park)phasis@gmail.com
<ul></ul><p>Here is patch for this bug:</p>
<p>diff --git a/thread.c b/thread.c.new<br>
index b7ae84c..9ef3d82 100644<br>
--- a/thread.c<br>
+++ b/thread.c.new<br>
@@ -4591,7 +4591,11 @@ recursive_check(VALUE list, VALUE obj_id, VALUE paired_obj_id)<br>
return Qfalse;<br>
if (paired_obj_id) {<br>
if (!RB_TYPE_P(pair_list, T_HASH)) {<br>
+#if SIZEOF_LONG == SIZEOF_VOIDP<br>
if (pair_list != paired_obj_id)<br>
+#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP</p>
<ul>
<li>if (!rb_eql(pair_list, paired_obj_id))<br>
+#endif<br>
return Qfalse;<br>
}<br>
else {</li>
</ul> Ruby master - Bug #7607: TypeError: invalid inspect_tbl pair_list on Windows 8https://bugs.ruby-lang.org/issues/7607?journal_id=350312012-12-24T01:20:47Zh.shirosaki (Hiroshi Shirosaki)h.shirosaki@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/3371">bignum_objid.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3371/bignum_objid.patch">bignum_objid.patch</a> added</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>usa (Usaku NAKAMURA)</i></li></ul><p>This seems cause of r38493, not r38548.</p>
<p>I confirmed this issue by the following test on x64 Win7.<br>
I've attached a patch which would be more inexpensive way since avoiding rb_funcall() usage.</p>
<p>require 'test/unit'</p>
<p>class ObjectIdTest < Test::Unit::TestCase</p>
<p>def test_self_referential_hash_equal_for_bignum_object_id<br>
GC.disable<br>
loop do<br>
" " * 1000000<br>
a = { :a => 'b' }<br>
b = a.dup<br>
a['self'] = a<br>
b['self'] = b<br>
p a.object_id.class<br>
assert_equal(a, b)<br>
break if a.object_id.class == Bignum<br>
end<br>
end<br>
end</p> Ruby master - Bug #7607: TypeError: invalid inspect_tbl pair_list on Windows 8https://bugs.ruby-lang.org/issues/7607?journal_id=350522012-12-25T10:10:29Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>5</i></li></ul><p>I think this is a serious bug, and shirosaki-san's patch seems OK.<br>
I want to backport this to 1.9.3 before releacing, but now trunk is under code freeze, I know.</p>
<p>But... I don't have time to wait for mame-san's reaction.<br>
So, on my responsibility, please commit this patch to trunk, shirosaki-san.<br>
mame-san, if you feel this is wrong decision, please reproach me.</p> Ruby master - Bug #7607: TypeError: invalid inspect_tbl pair_list on Windows 8https://bugs.ruby-lang.org/issues/7607?journal_id=350592012-12-25T19:14:14Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r38595.<br>
Heesob, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>
<p>bignum.c, include/ruby/intern.h (rb_big_eql): exported.</p>
</li>
<li>
<p>thread.c (recursive_check): object_id maybe a Bignum, not Fixnum on<br>
LLP64. see also r38493 and r38548.<br>
reported by Heesob Park at <a href="/issues/7607">[ruby-core:51083]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TypeError: invalid inspect_tbl pair_list on Windows 8 (Closed)" href="https://bugs.ruby-lang.org/issues/7607">#7607</a>], and patched<br>
by shirosaki at <a href="/issues/7607">[ruby-core:51095]</a></p>
</li>
</ul> Ruby master - Bug #7607: TypeError: invalid inspect_tbl pair_list on Windows 8https://bugs.ruby-lang.org/issues/7607?journal_id=350602012-12-25T19:23:09Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul></ul><p>Hello,</p>
<p>In message "<a href="/issues/7607">[ruby-core:51120]</a> [ruby-trunk - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: TypeError: invalid inspect_tbl pair_list on Windows 8 (Closed)" href="https://bugs.ruby-lang.org/issues/7607">#7607</a>] TypeError: invalid inspect_tbl pair_list on Windows 8"<br>
on Dec.25,2012 10:11:37, <a href="mailto:usa@garbagecollect.jp" class="email">usa@garbagecollect.jp</a> wrote:</p>
<blockquote>
<p>I want to backport this to 1.9.3 before releacing, but now trunk is under code freeze, I know.</p>
</blockquote>
<p>... mame-san said "25 Dec. 2012: code freeze", but I've noticed<br>
that we are still able to commit today!</p>
<blockquote>
<p>So, on my responsibility, please commit this patch to trunk, shirosaki-san.</p>
</blockquote>
<p>I'll commit in a substitute.</p>
<a name="Regards"></a>
<h2 >Regards,<a href="#Regards" class="wiki-anchor">¶</a></h2>
<p>U.Nakamura <a href="mailto:usa@garbagecollect.jp" class="email">usa@garbagecollect.jp</a></p>