Issue #6364 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to usa (Usaku NAKAMURA)

Usa-san, may I assign this to you?
If not, please reassign to Aaron who is a maintainer of dl.
I guess he will say "WONTFIX, use fiddle instead," though.

-- 

Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Bug #6364: Segmentation fault  happend when running  test_cptr.rb
https://bugs.ruby-lang.org/issues/6364#change-26227

Author: raylinn / gmail.com (ray linn)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20) [x64-mingw32]


Ruby 1.9.3-P194 compiled by MinGW64 (GCC 4.7.0), Compiled success, but failed when run test all. The same issue happened on GCC 4.6.3 + Ruby 1.9.3-P0. The error dump is 

C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:84: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20) [x64-mingw32]

-- Control frame information -----------------------------------------------
c:td p:---- s:td b:td l:td d:td CFUNC  :call
c:td p:td s:td b:td l:td d:td BLOCK  C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:84
c:td p:---- s:td b:td l:td d:td FINISH
c:td p:---- s:td b:td l:td d:td CFUNC  :open
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:81
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:949
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit/testcase.rb:17
c:td p:td s:td b:td l:td d:td BLOCK  C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:787
c:td p:---- s:td b:td l:td d:td FINISH
c:td p:---- s:td b:td l:td d:td CFUNC  :map
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:780
c:td p:td s:td b:td l:td d:td BLOCK  C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:565
c:td p:---- s:td b:td l:td d:td FINISH
c:td p:---- s:td b:td l:td d:td CFUNC  :each
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:563
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:746
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:909
c:td p:td s:td b:td l:td d:td BLOCK  C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:896
c:td p:---- s:td b:td l:td d:td FINISH
c:td p:---- s:td b:td l:td d:td CFUNC  :each
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:895
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:884
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:21
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:630
c:td p:td s:td b:td l:td d:td METHOD C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:634
c:td p:td s:td b:td l:tx d:tx EVAL   ./test/runner.rb:15
c:td p:---- s:td b:td l:td d:td FINISH
c:td p:td s:td b:td l:tx d:tx TOP   

-- Ruby level backtrace information ----------------------------------------
./test/runner.rb:15:in `<main>'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:634:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:630:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:21:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:884:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:895:in `_run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:895:in `each'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:896:in `block in _run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:909:in `run_tests'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:746:in `_run_anything'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:563:in `_run_suites'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:563:in `each'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit.rb:565:in `block in _run_suites'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:780:in `_run_suite'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:780:in `map'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:787:in `block in _run_suite'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/test/unit/testcase.rb:17:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/lib/minitest/unit.rb:949:in `run'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:81:in `test_to_ptr_io'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:81:in `open'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:84:in `block in test_to_ptr_io'
C:/msys/1.0/home/beta/ruby-1.9.3-p194/test/dl/test_cptr.rb:84:in `call'

-- C level backtrace information -------------------------------------------
C:\windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa) [0x00000000772F135A]
C:\windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9c) [0x000007FEFDA410DC]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_bugreport+0xa4) [0x00000000614AA334]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_name_err_mesg_new+0x6eb) [0x000000006137F8AB]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_bug+0x46) [0x0000000061380756]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_check_safe_str+0x1b4) [0x0000000061437964]
 [0x0000000000401A75]
C:\windows\SYSTEM32\ntdll.dll(_C_specific_handler+0x9c) [0x00000000772B85A8]
C:\windows\SYSTEM32\ntdll.dll(RtlDecodePointer+0xbd) [0x00000000772C9D0D]
C:\windows\SYSTEM32\ntdll.dll(RtlUnwindEx+0xbbf) [0x00000000772B91AF]
C:\windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e) [0x00000000772F1278]
C:\windows\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x6) [0x00000000772F2FC6]
C:\windows\system32\msvcrt.dll(pow+0x733e) [0x000007FEFDF7D0BE]
C:\windows\system32\msvcrt.dll(fputws+0x3d7) [0x000007FEFDFBC683]
C:\windows\system32\msvcrt.dll(fread+0x18) [0x000007FEFDFBC6E8]
 [0x00000000623C3AF1]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_call+0x8cc) [0x00000000614A588C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x209a) [0x000000006149D82A]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x5135) [0x00000000614A08C5]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_yield+0x155) [0x00000000614A7025]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_ensure+0xd3) [0x0000000061387F03]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_call+0x8cc) [0x00000000614A588C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x209a) [0x000000006149D82A]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x5135) [0x00000000614A08C5]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_yield+0x155) [0x00000000614A7025]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_ary_concat+0xbed) [0x000000006134D4BD]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_call+0x8cc) [0x00000000614A588C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x209a) [0x000000006149D82A]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x5135) [0x00000000614A08C5]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_yield+0x155) [0x00000000614A7025]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_ary_each+0x51) [0x00000000613464B1]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_call+0x8cc) [0x00000000614A588C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x209a) [0x000000006149D82A]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x5135) [0x00000000614A08C5]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_yield+0x155) [0x00000000614A7025]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_ary_each+0x51) [0x00000000613464B1]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_call+0x8cc) [0x00000000614A588C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x209a) [0x000000006149D82A]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_vm_localjump_error+0x5135) [0x00000000614A08C5]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_iseq_eval_main+0xac) [0x00000000614A7A7C]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(rb_check_frozen+0x2cf7) [0x00000000613850E7]
C:\msys\1.0\home\beta\ruby-1.9.3-p194\x64-msvcrt-ruby191.dll(ruby_run_node+0x44) [0x0000000061387704]
 [0x0000000000402D07]
 [0x00000000004013C9]
 [0x00000000004014E8]
C:\windows\system32\kernel32.dll(BaseThreadInitThunk+0xd) [0x0000000076BD652D]

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

* Loaded script: ./test/runner.rb


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