Project

General

Profile

Actions

Bug #12346

closed

Ruby 2.3.0 64-bit (mingw64-32) WIN32OLE_TYPE.typelibs seg faults on Windows 10 64-bit

Added by allen (Allen Hewes) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
Backport:
[ruby-core:75345]

Description

Ruby Windows binaries are from RubyInstaller.org.

Seg fault also happens with Ruby 2.3.1 using the same 64-bit DevKit.

in the test suite file test/win32ole/test_win32ole_type.rb, there is the test
test_s_typelibs:

def test_s_typelibs 
  tlibs = WIN32OLE_TYPE.typelibs.sort 
  tlibs2 = WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}.sort
  assert_equal(tlibs2, tlibs) 
end 

Ruby 2.3.0 64-bit produces segmentation fault at both places:

  tlibs = WIN32OLE_TYPE.typelibs.sort
  tlibs2 = WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}.sort 

very basic one line check for each test:

ruby.exe -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
ruby.exe -e "require 'win32ole'" -e "puts WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}.count"

fails in:
ruby-2.3.0-x64-mingw32 (see attachments)

works in:
ruby-2.3.0-i386-mingw32 (572)
ruby-2.2.4-i386-mingw32 (572)
ruby-2.2.4-x64-mingw32 (574)
ruby-2.1.8-i386-mingw32 (572)
ruby-2.1.8-x64-mingw32 (574)

I've attached the crash outputs for both:

WIN32OLE_TYPE.typelibs.sort = ruby-2.3.0p0-test_s_typelibs-seg-fault.txt
WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}.sort = ruby-2.3.0p0-test_s_typelibs-collect-seg-fault.txt
systeminfo | findstr /R /C:"^OS [Name|Version]" /C:"^Hotfix" /C:"KB"
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.10586 N/A Build 10586
Hotfix(s):                 15 Hotfix(s) Installed.
                           [01]: KB2693643
                           [02]: KB3105211
                           [03]: KB3116900
                           [04]: KB3120677
                           [05]: KB3122947
                           [06]: KB3124200
                           [07]: KB3124262
                           [08]: KB3124263
                           [09]: KB3135173
                           [10]: KB3139907
                           [11]: KB3140741
                           [12]: KB3140743
                           [13]: KB3140768
                           [14]: KB3154132
                           [15]: KB3147458

Files


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #11880: blank string makes Win32ole crushClosedsuke (Masaki Suketa)Actions

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Open to Feedback

I can't reproduce it with the trunk and 2.3.1 on Windows 7.
Probably it is related to the content of your registry.
Could you try building with -O0 and running from a debugger?

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Description updated (diff)

Updated by allen (Allen Hewes) over 8 years ago

It could be something with my registry but it works in Ruby 2.3.0 32-bit, Ruby 2.2.5 64-bit and Ruby 2.2 HEAD 64-bit.

Ruby 2.2 HEAD 64-bit:

.\sandbox\devkit\mingw\bin\gdb.exe --args .\sandbox\ruby22_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
GNU gdb (rubenvb-4.7.2-release) 7.5.50.20120920-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<mingw-w64-public@lists.sourceforge.net>...
Reading symbols from C:\Workspace\rubyinstaller.git\sandbox\ruby22_mingw\bin\ruby.exe...done.
(gdb) run
Starting program: C:\Workspace\rubyinstaller.git\sandbox\ruby22_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
[New Thread 15012.0x46e0]
[New Thread 15012.0x52fc]
[New Thread 15012.0x53b4]
[New Thread 15012.0x4860]
[New Thread 15012.0x5250]
ruby 2.2.6p322 (2016-04-29 revision 54815) [x64-mingw32]
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby22_mingw/lib/ruby/2.2.0/rubygems.rb:1222 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby22_mingw/lib/ruby/2.2.0/rubygems.rb:1231 - cannot load such file -- rubygems/defaults/ruby
574
[Inferior 1 (process 15012) exited normally]
(gdb)

Ruby 2.2.5 64-bit:

.\sandbox\devkit\mingw\bin\gdb.exe --args .\sandbox\ruby22_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
GNU gdb (rubenvb-4.7.2-release) 7.5.50.20120920-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<mingw-w64-public@lists.sourceforge.net>...
Reading symbols from C:\Workspace\rubyinstaller.git\sandbox\ruby22_mingw\bin\ruby.exe...done.
(gdb) run
Starting program: C:\Workspace\rubyinstaller.git\sandbox\ruby22_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
[New Thread 19564.0x598c]
[New Thread 19564.0x5a80]
[New Thread 19564.0x127c]
[New Thread 19564.0x5934]
[New Thread 19564.0x59a8]
ruby 2.2.5p319 (2016-04-26 revision 54774) [x64-mingw32]
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby22_mingw/lib/ruby/2.2.0/rubygems.rb:1222 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby22_mingw/lib/ruby/2.2.0/rubygems.rb:1231 - cannot load such file -- rubygems/defaults/ruby
574
[Inferior 1 (process 19564) exited normally]
(gdb)

Updated by allen (Allen Hewes) over 8 years ago

patch from https://bugs.ruby-lang.org/issues/11880 fixes this issue. it's also fixed in ruby_2_3 head.

Ruby 2.3.0:

.\sandbox\devkit\mingw\bin\gdb.exe --args .\sandbox\ruby23_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
GNU gdb (rubenvb-4.7.2-release) 7.5.50.20120920-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<mingw-w64-public@lists.sourceforge.net>...
Reading symbols from C:\Workspace\rubyinstaller.git\sandbox\ruby23_mingw\bin\ruby.exe...done.
(gdb) run
Starting program: C:\Workspace\rubyinstaller.git\sandbox\ruby23_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
[New Thread 22076.0x3c10]
[New Thread 22076.0x5d58]
[New Thread 22076.0xc4]
[New Thread 22076.0x3f18]
[New Thread 22076.0x11b4]
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean

Program received signal SIGSEGV, Segmentation fault.
0x00000000652837c2 in ?? ()
   from C:\Workspace\rubyinstaller.git\sandbox\ruby23_mingw\lib\x64-mingw32\ruby\2.3.0\win32ole.so
(gdb)

Ruby 2.3.0 with https://bugs.ruby-lang.org/issues/11880:

.\sandbox\devkit\mingw\bin\gdb.exe --args .\sandbox\ruby23_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
GNU gdb (rubenvb-4.7.2-release) 7.5.50.20120920-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<mingw-w64-public@lists.sourceforge.net>...
Reading symbols from C:\Workspace\rubyinstaller.git\sandbox\ruby23_mingw\bin\ruby.exe...done.
(gdb) run
Starting program: C:\Workspace\rubyinstaller.git\sandbox\ruby23_mingw\bin\ruby.exe -d -v -e "require 'win32ole'" -e "puts WIN32OLE_TYPE.typelibs.count"
[New Thread 16408.0x17ec]
[New Thread 16408.0x73d8]
[New Thread 16408.0x1c9c]
[New Thread 16408.0x167c]
[New Thread 16408.0x74d4]
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/ruby
Exception `LoadError' at C:/Workspace/rubyinstaller.git/sandbox/ruby23_mingw/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean
574
[Inferior 1 (process 16408) exited normally]
(gdb)
Actions #5

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Is duplicate of Bug #11880: blank string makes Win32ole crush added

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Feedback to Closed
  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.3: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0