From: "phasis68 (Heesob Park)" <phasis@...>
Date: 2012-11-28T22:28:05+09:00
Subject: [ruby-core:50255] [ruby-trunk - Bug #7454][Open] PPTestModule test failuere on Windows 8


Issue #7454 has been reported by phasis68 (Heesob Park).

----------------------------------------
Bug #7454: PPTestModule test failuere on Windows 8
https://bugs.ruby-lang.org/issues/7454

Author: phasis68 (Heesob Park)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2012-11-23 trunk 37811) [x64-mswin64_110]


I found following test failures with VC 2012 64bit compiler on Windows 8.

[ 436/9569] PPTestModule::PPCycleTest#test_anonymous = 0.00 s
  1) Failure:
test_anonymous(PPTestModule::PPCycleTest) [C:/work/snapshot/test/test_pp.rb:151]:
<"#<#<Class:0x00001682e1a2b0>:0x00001682e1a260>\n"> expected but was
<"#<#<Class:0x00001682e1a2b0>:0x00000082e1a260>\n">.

[ 439/9569] PPTestModule::PPCycleTest#test_object = 0.00 s
  2) Failure:
test_object(PPTestModule::PPCycleTest) [C:/work/snapshot/test/test_pp.rb:146]:
<"#<Object:0x00001682e0b8f0 @a=#<Object:0x00001682e0b8f0 ...>>\n"> expected but was
<"#<Object:0x00000082e0b8f0 @a=#<Object:0x00000082e0b8f0 ...>>\n">.

[ 449/9569] PPTestModule::PPInspectTest#test_to_s_with_iv = 0.00 s
  3) Failure:
test_to_s_with_iv(PPTestModule::PPInspectTest) [C:/work/snapshot/test/test_pp.rb:109]:
<"#<Object:0x00001682db99b0 @a=nil>\n"> expected but was
<"#<Object:0x00000082db99b0 @a=nil>\n">.

[ 450/9569] PPTestModule::PPInspectTest#test_to_s_without_iv = 0.00 s
  4) Failure:
test_to_s_without_iv(PPTestModule::PPInspectTest) [C:/work/snapshot/test/test_pp.rb:116]:
<"#<Object:0x00001682db8f60>\n"> expected but was
<"#<Object:0x00000082db8f60>\n">.


The above error is related with the address range of Object allocation on Windows 8.
The address is exceeded fixnum(32bit) range. 
But object_id is fixnum and pp module is based on object_id.
Thus, pp module cannot restore the original address of the Object.

C:\WINDOWS\system32>irb
irb(main):001:0> a = Object.new
=> #<Object:0x00001457366bc0>
irb(main):002:0> a.object_id
=> 731592160
irb(main):003:0> require 'pp'
=> true
irb(main):004:0> PP.pp(a,'')
=> "#<Object:0x00000057366bc0>\n"



-- 
http://bugs.ruby-lang.org/