Project

General

Profile

Actions

Bug #9823

closed

Segmentation fault using DL

Added by chrahunt (Christopher Hunt) almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
[ruby-core:62483]

Description

I receive a segmentation fault when calling OpenProcessToken from DL, demonstrated by running the attached 'runner.rb' file with the additional files in the same directory. This is a simplified representation, but perhaps not minimal, though with good reason. Doing any one of the following prevents a segmentation fault:
Copying line 3 from runner.rb to the bottom of mwe.rb and running mwe.rb directly.
Commenting out line 5 of mwe.rb or commenting out some large subset of errors.rb (e.g. commenting out lines 37 through 99 result in no segfault).
Commenting out line 3 of runner.rb, in effect only requiring the other files and exiting.
Commenting out a combination of the following from within Pageant::Win results in no segfault:

  • Calls to extern
  • Calls to struct
  • Constants
  • Class methods

In the last case it is not necessary to comment out all of the items of a particular category. For instance, a segfault is avoided if I comment out TOKEN_USER and SECURITY_ATTRIBUTES. I may also prevent a segfault by commenting out TOKEN_USER and the extern statement associated with IsValidSecurityDescriptor.

I have also tried this in the latest (ruby 2.1.2p95 (2014-05-08 revision 45867) [i386-mingw32]) with similar results. I've attached the error output for each of 1.9.3 and 2.1.2.


Files

runner.rb (68 Bytes) runner.rb chrahunt (Christopher Hunt), 05/09/2014 11:34 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0