Bug #7492

Segmentation fault at DL::TestDL#test_call_double on x64 Windows 8

Added by Heesob Park over 1 year ago. Updated about 1 month ago.

[ruby-core:<unknown>]
Status:Feedback
Priority:Normal
Assignee:Aaron Patterson
Category:ext
Target version:current: 2.2.0
ruby -v:ruby 2.0.0dev (2012-12-02 trunk 38132) [x64-mswin64_110] Backport:

Description

I can see the following segmentation fault with trunk build with x64 VC 2012 on Windows 8.

C:\work\snapshot-ms64>nmake test-all TESTS="dl/test_dl2.rb"

Microsoft(R) Program Maintenance Utility 버전 11.00.50727.1
Copyright (c) Microsoft Corporation. All rights reserved.

    CC = cl -nologo
    LD = cl -nologo
    LDSHARED = cl -nologo -LD
    CFLAGS = -MD -Zi -W2 -wd4996 -we4028 -we4142 -O2sy-  -Zm600
    XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_110 -I./include -I. -I./missing
    CPPFLAGS =
    DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
    SOLIBS =
    .\ruby.exe -I./lib -I".ext/x64-mswin64_110" -I. "./tool/runruby.rb" --extout=".ext"  -- --disable-gems "./test/runner.rb" --ruby=".\ruby.exe -I./lib -I".ext/x64-mswin64_110" -I. "./tool/runruby.rb" --extout=".ext"  -- --disable-gems"  dl/test_dl2.rb

Run options: "--ruby=.\ruby.exe -I./lib -I.ext/x64-mswin64_110 -I. ./tool/runruby.rb --extout=.ext -- --disable-gems"

Running tests:

[ 2/18] DL::TestDL#testcalldoubleC:/work/snapshot-ms64/test/dl/testdl2.rb:89:
[BUG] Segmentation fault
ruby 2.0.0dev (2012-12-02 trunk 38132) [x64-mswin64
110]

-- Control frame information -----------------------------------------------
c:0023 p:---- s:0106 e:000105 CFUNC :call
c:0022 p:0051 s:0102 e:000101 METHOD C:/work/snapshot-ms64/test/dl/test_dl2.rb:89
c:0021 p:0041 s:0097 e:000096 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:852
c:0020 p:0074 s:0092 e:000091 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:1301
c:0019 p:0021 s:0084 e:000083 METHOD C:/work/snapshot-ms64/lib/test/unit/testcase.rb:17
c:0018 p:0077 s:0080 e:000079 BLOCK C:/work/snapshot-ms64/lib/minitest/unit.rb:919 [FINISH]
c:0017 p:---- s:0074 e:000073 CFUNC :map
c:0016 p:0103 s:0071 e:000070 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:912
c:0015 p:0018 s:0063 e:000061 BLOCK C:/work/snapshot-ms64/lib/test/unit.rb:651
[FINISH]
c:0014 p:---- s:0058 e:000057 CFUNC :each
c:0013 p:0074 s:0055 e:000054 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:649
c:0012 p:0147 s:0049 e:000048 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:867
c:0011 p:0009 s:0039 e:000038 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:1060
c:0010 p:0010 s:0036 e:000035 BLOCK C:/work/snapshot-ms64/lib/minitest/unit.rb:1047 [FINISH]
c:0009 p:---- s:0033 e:000032 CFUNC :each
c:0008 p:0042 s:0030 e:000029 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:1046
c:0007 p:0019 s:0026 e:000025 METHOD C:/work/snapshot-ms64/lib/minitest/unit.rb:1035
c:0006 p:0021 s:0022 e:000021 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:21
c:0005 p:0011 s:0018 e:000017 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:768
c:0004 p:0040 s:0013 e:000012 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:828
c:0003 p:0012 s:0010 e:000009 METHOD C:/work/snapshot-ms64/lib/test/unit.rb:832
c:0002 p:0180 s:0006 e:000440 EVAL ./test/runner.rb:17 [FINISH]
c:0001 p:0000 s:0002 e:002198 TOP [FINISH]

./test/runner.rb:17:in <main>'
C:/work/snapshot-ms64/lib/test/unit.rb:832:in
run'
C:/work/snapshot-ms64/lib/test/unit.rb:828:in run'
C:/work/snapshot-ms64/lib/test/unit.rb:768:in
run'
C:/work/snapshot-ms64/lib/test/unit.rb:21:in run'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1035:in
run'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1046:in _run'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1046:in
each'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1047:in block in _run'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1060:in
runtests'
C:/work/snapshot-ms64/lib/minitest/unit.rb:867:in _run_anything'
C:/work/snapshot-ms64/lib/test/unit.rb:649:in
runsuites'
C:/work/snapshot-ms64/lib/test/unit.rb:649:in each'
C:/work/snapshot-ms64/lib/test/unit.rb:651:in
block in _run
suites'
C:/work/snapshot-ms64/lib/minitest/unit.rb:912:in _run_suite'
C:/work/snapshot-ms64/lib/minitest/unit.rb:912:in
map'
C:/work/snapshot-ms64/lib/minitest/unit.rb:919:in block in _run_suite'
C:/work/snapshot-ms64/lib/test/unit/testcase.rb:17:in
run'
C:/work/snapshot-ms64/lib/minitest/unit.rb:1301:in run'
C:/work/snapshot-ms64/lib/test/unit.rb:852:in
runtest'
C:/work/snapshot-ms64/test/dl/test
dl2.rb:89:in test_call_double'
C:/work/snapshot-ms64/test/dl/test_dl2.rb:89:in
call'

-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa) [0x000007FB32122C2A]
C:\WINDOWS\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9a) [0x000007FB2F4210EA]
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbvmbugreport+0x98) [0x000007FB18AE334C] c:\work\snapshot-ms64\vmdump.c:668
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(report
bug+0x112) [0x000007FB18A43CA2] c:\work\snapshot-ms64\error.c:308
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbbug+0x49) [0x000007FB18A42725] c:\work\snapshot-ms64\error.c:329
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(sigsegv+0x48) [0x000007FB18A8FD8C] c:\work\snapshot-ms64\signal.c:629
C:\WINDOWS\SYSTEM32\MSVCR110.dll(XcptFilter+0x1a9) [0x000007FB2517F2B5]
C:\work\snapshot-ms64\ruby.exe(
tmainCRTStartup$filt$0+0x16) [0x000007F6870516D6] f:\dd\vctools\crtbld\self64amd64\crt\src\crtexe.c:553
C:\WINDOWS\SYSTEM32\MSVCR110.dll(Cspecifichandler+0x93) [0x000007FB2517E66F]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlLookupFunctionEntry+0x26d) [0x000007FB3214464D]
C:\WINDOWS\SYSTEM32\ntdll.dll(DbgPrint+0x47c) [0x000007FB3214567C]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e) [0x000007FB32124BBA]
C:\WINDOWS\SYSTEM32\MSVCR110.dll(atof
l+0x63) [0x000007FB2514DF87]
C:\work\snapshot-ms64.ext\x64-mswin64110\dl.so(rbdlcfunccall+0x20b) [0x000007FB26F714C7] c:\work\snapshot-ms64\ext\dl\cfunc.c:476
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
callcfuncwithframe+0x12d) [0x000007FB18A38C59] c:\work\snapshot-ms64\vminsnhelper.c:1464
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmcallmethod+0x386) [0x000007FB18A393F2] c:\work\snapshot-ms64\vminsnhelper.c:1715
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
execcore+0x1317) [0x000007FB18A3B9EF] c:\work\snapshot-ms64\insns.def:1010
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
exec+0xac) [0x000007FB18A3A0E4] c:\work\snapshot-ms64\vm.c:1157
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(invokeblockfromc+0x1b5) [0x000007FB18A329F1] c:\work\snapshot-ms64\vm.c:627
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rb
yield0+0x57) [0x000007FB18A37533] c:\work\snapshot-ms64\vmeval.c:869
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbyield+0x24) [0x000007FB18A374D4] c:\work\snapshot-ms64\vmeval.c:880
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbarycollect+0xad) [0x000007FB18A4909D] c:\work\snapshot-ms64\array.c:2538
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmcallcfuncwithframe+0x12d) [0x000007FB18A38C59] c:\work\snapshot-ms64\vminsnhelper.c:1464
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
callmethod+0x386) [0x000007FB18A393F2] c:\work\snapshot-ms64\vminsnhelper.c:1715
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmexeccore+0x1389) [0x000007FB18A3BA61] c:\work\snapshot-ms64\insns.def:995
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmexec+0xac) [0x000007FB18A3A0E4] c:\work\snapshot-ms64\vm.c:1157
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(invoke
blockfromc+0x1b5) [0x000007FB18A329F1] c:\work\snapshot-ms64\vm.c:627
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbyield0+0x57) [0x000007FB18A37533] c:\work\snapshot-ms64\vmeval.c:869
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rb
yield+0x24) [0x000007FB18A374D4] c:\work\snapshot-ms64\vmeval.c:880
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rb
aryeach+0xa4) [0x000007FB18A4A1DC] c:\work\snapshot-ms64\array.c:1677
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
callcfuncwithframe+0x12d) [0x000007FB18A38C59] c:\work\snapshot-ms64\vminsnhelper.c:1464
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmcallmethod+0x386) [0x000007FB18A393F2] c:\work\snapshot-ms64\vminsnhelper.c:1715
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
execcore+0x1389) [0x000007FB18A3BA61] c:\work\snapshot-ms64\insns.def:995
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
exec+0xac) [0x000007FB18A3A0E4] c:\work\snapshot-ms64\vm.c:1157
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(invokeblockfromc+0x1b5) [0x000007FB18A329F1] c:\work\snapshot-ms64\vm.c:627
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rb
yield0+0x57) [0x000007FB18A37533] c:\work\snapshot-ms64\vmeval.c:869
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbyield+0x24) [0x000007FB18A374D4] c:\work\snapshot-ms64\vmeval.c:880
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rbaryeach+0xa4) [0x000007FB18A4A1DC] c:\work\snapshot-ms64\array.c:1677
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmcallcfuncwithframe+0x12d) [0x000007FB18A38C59] c:\work\snapshot-ms64\vminsnhelper.c:1464
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vm
callmethod+0x386) [0x000007FB18A393F2] c:\work\snapshot-ms64\vminsnhelper.c:1715
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmexeccore+0x1389) [0x000007FB18A3BA61] c:\work\snapshot-ms64\insns.def:995
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(vmexec+0xac) [0x000007FB18A3A0E4] c:\work\snapshot-ms64\vm.c:1157
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rb
iseqevalmain+0x7c) [0x000007FB18A350FC] c:\work\snapshot-ms64\vm.c:1405
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rubyexecinternal+0xb1) [0x000007FB189F6D69] c:\work\snapshot-ms64\eval.c:255
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rubyexecnode+0x1d) [0x000007FB189F6DB9] c:\work\snapshot-ms64\eval.c:316
C:\work\snapshot-ms64\x64-msvcr110-ruby200.dll(rubyrunnode+0x30) [0x000007FB189F700C] c:\work\snapshot-ms64\eval.c:307
C:\work\snapshot-ms64\ruby.exe(main+0x40) [0x000007F687051040] c:\work\snapshot-ms64\main.c:38
C:\work\snapshot-ms64\ruby.exe(_tmainCRTStartup+0x10f) [0x000007F6870512A7] f:\dd\vctools\crtbld\self64amd64\crt\src\crtexe.c:536
C:\WINDOWS\system32\KERNEL32.DLL(BaseThreadInitThunk+0x1a) [0x000007FB3009167E]

-- Other runtime information -----------------------------------------------

  • Loaded script: ./test/runner.rb: DL::TestDL#testcalldouble

  • Loaded features:

    0 enumerator.so
    1 C:/work/snapshot-ms64/.ext/x64-mswin64110/enc/encdb.so
    2 C:/work/snapshot-ms64/.ext/x64-mswin64
    110/enc/cp949.so
    3 C:/work/snapshot-ms64/.ext/x64-mswin64110/enc/trans/transdb.so
    4 C:/work/snapshot-ms64/rbconfig.rb
    5 C:/work/snapshot-ms64/lib/optparse.rb
    6 C:/work/snapshot-ms64/lib/thread.rb
    7 C:/work/snapshot-ms64/lib/minitest/parallel
    each.rb
    8 C:/work/snapshot-ms64/lib/minitest/unit.rb
    9 C:/work/snapshot-ms64/lib/prettyprint.rb
    10 C:/work/snapshot-ms64/lib/pp.rb
    11 C:/work/snapshot-ms64/lib/test/unit/assertions.rb
    12 C:/work/snapshot-ms64/lib/test/unit/testcase.rb
    13 C:/work/snapshot-ms64/lib/test/unit.rb
    14 C:/work/snapshot-ms64/lib/open3.rb
    15 C:/work/snapshot-ms64/lib/timeout.rb
    16 C:/work/snapshot-ms64/.ext/x64-mswin64110/enc/trans/korean.so
    17 C:/work/snapshot-ms64/test/ruby/envutil.rb
    18 C:/work/snapshot-ms64/.ext/x64-mswin64
    110/dl.so
    19 C:/work/snapshot-ms64/.ext/common/dl.rb
    20 C:/work/snapshot-ms64/test/dl/testbase.rb
    21 C:/work/snapshot-ms64/.ext/common/dl/callback.rb
    22 C:/work/snapshot-ms64/.ext/common/dl/stack.rb
    23 C:/work/snapshot-ms64/.ext/common/dl/value.rb
    24 C:/work/snapshot-ms64/.ext/common/dl/func.rb
    25 C:/work/snapshot-ms64/.ext/common/dl/pack.rb
    26 C:/work/snapshot-ms64/test/dl/test
    dl2.rb
    27 C:/work/snapshot-ms64/.ext/x64-mswin64110/enc/utf16le.so
    28 C:/work/snapshot-ms64/.ext/x64-mswin64110/enc/trans/utf1632.so
    29 C:/work/snapshot-ms64/.ext/x64-mswin64
    110/enc/trans/singlebyte.so
    30 C:/work/snapshot-ms64/.ext/x64-mswin64
    110/io/console.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

NMAKE : fatal error U1077: '.\ruby.exe' : '0x3' 반환 코드입니다.
Stop.

dl2.patch Magnifier (2.57 KB) Heesob Park, 03/17/2014 01:10 AM

History

#1 Updated by Zachary Scott over 1 year ago

  • Category set to ext
  • Assignee set to Aaron Patterson
  • Target version set to 2.0.0

Assigning this to Aaron, thank you!

#2 Updated by Heesob Park over 1 year ago

The segment fault is due to the wrong pack type "l!" on 64bit Windows.

Here is a patch:

diff --git a/test_dl2.rb b/test_dl2.rb.new
index 88ef086..231f082 100644
--- a/test_dl2.rb
+++ b/test_dl2.rb.new
@@ -28,7 +28,7 @@ class TestDL < TestBase
     assert_equal ptr_id, ptr.to_i

     cfunc  = CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy')
-             cfunc.call([ptr_id,str].pack("l!p").unpack("l!*"))
+             cfunc.call([ptr_id,str].pack(PackInfo::PACK_MAP[TYPE_VOIDP]+"p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal("abc\0", ptr[0,4])
     DL.free ptr_id
   end
@@ -51,7 +51,7 @@ class TestDL < TestBase
     assert_equal ptr_id, ptr.to_i

     cfunc  = CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy')
-             cfunc.call([ptr_id,str].pack("l!p").unpack("l!*"))
+             cfunc.call([ptr_id,str].pack(PackInfo::PACK_MAP[TYPE_VOIDP]+"p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal("abc\0", ptr[0,4])
     DL.free ptr_id
   end
@@ -67,30 +67,30 @@ class TestDL < TestBase

   def test_call_int()
     cfunc = CFunc.new(@libc['atoi'], TYPE_INT, 'atoi')
-    x = cfunc.call(["100"].pack("p").unpack("l!*"))
+    x = cfunc.call(["100"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal(100, x)

     cfunc = CFunc.new(@libc['atoi'], TYPE_INT, 'atoi')
-    x = cfunc.call(["-100"].pack("p").unpack("l!*"))
+    x = cfunc.call(["-100"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal(-100, x)
   end

   def test_call_long()
     cfunc = CFunc.new(@libc['atol'], TYPE_LONG, 'atol')
-    x = cfunc.call(["100"].pack("p").unpack("l!*"))
+    x = cfunc.call(["100"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal(100, x)
     cfunc = CFunc.new(@libc['atol'], TYPE_LONG, 'atol')
-    x = cfunc.call(["-100"].pack("p").unpack("l!*"))
+    x = cfunc.call(["-100"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal(-100, x)
   end

   def test_call_double()
     cfunc = CFunc.new(@libc['atof'], TYPE_DOUBLE, 'atof')
-    x = cfunc.call(["0.1"].pack("p").unpack("l!*"))
+    x = cfunc.call(["0.1"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_in_delta(0.1, x)

     cfunc = CFunc.new(@libc['atof'], TYPE_DOUBLE, 'atof')
-    x = cfunc.call(["-0.1"].pack("p").unpack("l!*"))
+    x = cfunc.call(["-0.1"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_in_delta(-0.1, x)
   end

@@ -110,7 +110,7 @@ class TestDL < TestBase

   def test_strlen()
     cfunc = CFunc.new(@libc['strlen'], TYPE_INT, 'strlen')
-    x = cfunc.call(["abc"].pack("p").unpack("l!*"))
+    x = cfunc.call(["abc"].pack("p").unpack(PackInfo::PACK_MAP[TYPE_VOIDP]+"*"))
     assert_equal("abc".size, x)
   end

#3 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Open to Assigned

#4 Updated by Yusuke Endoh about 1 year ago

  • Target version changed from 2.0.0 to next minor

Just an issue of test.

Yusuke Endoh mame@tsg.ne.jp

#5 Updated by Zachary Scott 8 months ago

park-san can you reproduce this still?

#6 Updated by Heesob Park 8 months ago

Yes, of course. I can reproduce it with snapshot still.
Why you ignore my patch?

BTW, I do not want to be called as -san because I am not a Japanese.

#7 Updated by Zachary Scott 8 months ago

The patch seems good, but I cannot test without a windows env.

On Aug 15, 2013, at 10:42 AM, "phasis68 (Heesob Park)" phasis@gmail.com wrote:

BTW, I do not want to be called as -san because I am not a Japanese.

Oh, sorry! Please forgive my ignorance.

#8 Updated by Heesob Park 5 months ago

I am curious why my simple and obvious patch not accepted over 1 year.

#9 Updated by Hiroshi SHIBATA 5 months ago

  • Target version changed from next minor to 2.1.0

phasis68

Thank you your nudge.

tenderlove

Can you handle this until release of 2.1.0?

#10 Updated by Vit Ondruch 5 months ago

This seems to be related to #6592, although I have not experienced segfaults as you.

#11 Updated by Zachary Scott 4 months ago

I don't see the segfault on rubyci.org[1] either, can anyone reproduce this?

1: http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20131212T131655Z.log.html.gz

#12 Updated by Zachary Scott 4 months ago

  • Status changed from Assigned to Feedback

#13 Updated by Heesob Park 4 months ago

rubyci.org platform is Windows 7.

You can see the segfault on 64 bit Windows 8.x with x64 VC++ 2012 or 2013 compiler.

It seems that nobody here but me care for Ruby on Windows 8.

#14 Updated by Zachary Scott 4 months ago

Can we setup a build for that? Or perhaps we can set it up on travis?

#15 Updated by Heesob Park 4 months ago

Why you are reluctant to apply my patch?
In Windows 7, it is a latent bug.
It is not causing any incompatibility but only affects Windows 64 bit.

Almost platforms except Windows 64 bit, DL::PackInfo::PACKMAP[DL::TYPEVOIDP] is "l!"

C:\Users\phasis>ruby -v
ruby 2.0.0p353 (2013-11-22) [i386-mingw32]

C:\Users\phasis>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'dl/pack'
=> true
irb(main):002:0> DL::PackInfo::PACKMAP[DL::TYPEVOIDP]
=> "l!"

On Windows 64 bit, DL::PackInfo::PACKMAP[DL::TYPEVOIDP] is "q"

C:\Users\phasis>ruby -v
ruby 2.0.0p247 (2013-06-27) [x64-mingw32]

C:\Users\phasis>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'dl/pack'
=> true
irb(main):002:0> DL::PackInfo::PACKMAP[DL::TYPEVOIDP]
=> "q"

#16 Updated by Zachary Scott 4 months ago

Only because I can't test it

#17 Updated by Heesob Park 4 months ago

2013/12/13 Zachary Scott e@zzak.io:

Only because I can't test it
I understand you. But nobody can test all the platforms.
I can test it on Windows 8.
Besides, this is not a ruby source code, but a test code.

I already waited a year without this patch and can wait for one more year.

#18 Updated by Hiroshi SHIBATA 3 months ago

  • Target version changed from 2.1.0 to current: 2.2.0

#19 Updated by Zachary Scott about 1 month ago

@heesob Could you reupload your patch?

It seems the RTE migration ate your old patch :(

#20 Updated by Heesob Park about 1 month ago

I uploaded the patch for the trunk.

Also available in: Atom PDF