Project

General

Profile

Actions

Bug #12778

closed

Segmentation Fault in win32ole on Ruby 2.3.1p112 [x64-mingw32] when creating Windows Share

Added by rlaveycal (Richard Lavey) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
[ruby-core:77328]

Description

Whilst using ruby to create a shared folder on Windows I encountered a seg fault. This reproduces the issue on Windows 2012R2.

\Ruby23-x64\bin\ruby -rwin32ole -e 'wmi = WIN32OLE.connect("winmgmts://"); share = wmi.get("Win32_Share"); puts share.create("c:\\test2", "test", 0, 16777216, "", nil, nil)'

The stack dump is attached

c:0003 p:---- s:0018 e:000017 CFUNC  :method_missing

The cause is the empty string in the call to create(). Changing this to nil or a non-empty string works. The x86 version of Ruby is unaffected.


Files

ruby seg.txt (5.58 KB) ruby seg.txt Stack trace rlaveycal (Richard Lavey), 09/20/2016 12:48 PM

Related issues 1 (0 open1 closed)

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

Updated by suke (Masaki Suketa) about 8 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: DONE

Thank you for your reporting.
This issue is same as #11880.
And I confirmed it works in ruby 2.3.2p182.

Actions #2

Updated by suke (Masaki Suketa) about 8 years ago

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

Updated by suke (Masaki Suketa) about 8 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: DONE to 2.1: UNKNOWN, 2.2: DONE, 2.3: DONE

Updated by suke (Masaki Suketa) about 8 years ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0