[Win32utils-devel] File.realpath

Daniel Berger djberg96 at gmail.com
Wed Nov 20 21:13:59 UTC 2013


It looks like there are some other places where I have the buffer size set
wrong, too.

I noticed that I can make it segfault if I just run "rake" repeatedly:

c:/ruby264/bin/ruby.exe -w -I"lib"
-I"c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib"
"c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_test_loader.rb"
"test/test*.rb"

c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/stat.rb:60:
warning: method redefined; discarding old initialize

c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_test_loader.rb:
[BUG] Segmentation fault

ruby 2.0.0p247 (2013-06-27) [x64-mingw32]



-- Control frame information -----------------------------------------------

c:0001 p:0000 s:0002 E:001838 TOP    [FINISH]





-- C level backtrace information -------------------------------------------

C:\Windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xa)
[0x00000000770C12FA]

C:\Windows\system32\KERNELBASE.dll(WaitForSingleObjectEx+0x9c)
[0x000007FEFD1B10DC]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_vm_bugreport+0x9d)
[0x000000006F28327D]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_name_err_mesg_new+0x838)
[0x000000006F141DF8]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_bug+0x45) [0x000000006F142BA5]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_check_safe_str+0x18c)
[0x000000006F208E5C]

 [0x0000000000401A85]

C:\Windows\SYSTEM32\ntdll.dll(_C_specific_handler+0x9c) [0x00000000770885C8]

C:\Windows\SYSTEM32\ntdll.dll(RtlDecodePointer+0xad) [0x0000000077099D2D]

C:\Windows\SYSTEM32\ntdll.dll(RtlUnwindEx+0xbbf) [0x00000000770891CF]

C:\Windows\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x2e)
[0x00000000770C1248]

C:\Windows\SYSTEM32\ntdll.dll(RtlQueryEnvironmentVariable+0x8cc)
[0x000000007709642C]

C:\Windows\SYSTEM32\ntdll.dll(RtlQueryEnvironmentVariable+0xa76)
[0x00000000770965D6]

C:\Windows\system32\msvcrt.dll(free+0x1c) [0x000007FEFE7B10C8]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(ruby_set_debug_option+0x1ba)
[0x000000006F264F7A]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_obj_id+0x24e) [0x000000006F15C9EE]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(rb_gc_call_finalizer_at_exit+0x28e)
[0x000000006F16146E]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(ruby_cleanup+0x21a)
[0x000000006F14A18A]

c:\ruby264\bin\x64-msvcrt-ruby200.dll(ruby_run_node+0x58)
[0x000000006F14A428]

 [0x0000000000402D14]

 [0x00000000004013D7]

 [0x00000000004014F8]

C:\Windows\system32\kernel32.dll(BaseThreadInitThunk+0xd)
[0x0000000076F6652D]



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



* Loaded script:
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_test_loader.rb



* Loaded features:



    0 enumerator.so

    1 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/encdb.so

    2 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/iso_8859_1.so

    3 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/trans/transdb.so

    4 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/rbconfig.rb

    5 c:/ruby264/lib/ruby/2.0.0/rubygems/compatibility.rb

    6 c:/ruby264/lib/ruby/2.0.0/rubygems/defaults.rb

    7 c:/ruby264/lib/ruby/2.0.0/rubygems/deprecate.rb

    8 c:/ruby264/lib/ruby/2.0.0/rubygems/errors.rb

    9 c:/ruby264/lib/ruby/2.0.0/rubygems/version.rb

   10 c:/ruby264/lib/ruby/2.0.0/rubygems/requirement.rb

   11 c:/ruby264/lib/ruby/2.0.0/rubygems/platform.rb

   12 c:/ruby264/lib/ruby/2.0.0/rubygems/specification.rb

   13 c:/ruby264/lib/ruby/2.0.0/rubygems/exceptions.rb

   14 c:/ruby264/lib/ruby/2.0.0/rubygems/defaults/operating_system.rb

   15 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/utf_16le.so

   16 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/trans/utf_16_32.so

   17 c:/ruby264/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb

   18 c:/ruby264/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb

   19 c:/ruby264/lib/ruby/2.0.0/rubygems.rb

   20 c:/ruby264/lib/ruby/2.0.0/rubygems/dependency.rb

   21 c:/ruby264/lib/ruby/2.0.0/rubygems/path_support.rb

   22 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/version.rb

   23 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/etc.so

   24 c:/ruby264/lib/ruby/2.0.0/fileutils.rb

   25 c:/ruby264/lib/ruby/2.0.0/thread.rb

   26 c:/ruby264/lib/ruby/2.0.0/singleton.rb

   27 c:/ruby264/lib/ruby/2.0.0/monitor.rb

   28 c:/ruby264/lib/ruby/2.0.0/optparse.rb

   29 c:/ruby264/lib/ruby/2.0.0/ostruct.rb

   30 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/ext/module.rb

   31 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/ext/core.rb

   32 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/ext/string.rb

   33 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/early_time.rb

   34 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/ext/time.rb

   35 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/alt_system.rb

   36 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/win32.rb

   37
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/linked_list.rb

   38 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/scope.rb

   39
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task_argument_error.rb

   40
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rule_recursion_overflow_error.rb

   41 c:/ruby264/lib/ruby/2.0.0/shellwords.rb

   42
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task_manager.rb

   43 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/cloneable.rb

   44 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/file_utils.rb

   45
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/file_utils_ext.rb

   46 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/pathmap.rb

   47 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/file_list.rb

   48 c:/ruby264/lib/ruby/2.0.0/set.rb

   49 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/promise.rb

   50
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/thread_pool.rb

   51
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/private_reader.rb

   52
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/thread_history_display.rb

   53
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/trace_output.rb

   54
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/application.rb

   55
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_module.rb

   56
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/pseudo_status.rb

   57
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task_arguments.rb

   58
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/invocation_chain.rb

   59
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/invocation_exception_mixin.rb

   60 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task.rb

   61 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/file_task.rb

   62
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/file_creation_task.rb

   63 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/multi_task.rb

   64
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/dsl_definition.rb

   65
c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/default_loader.rb

   66 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/name_space.rb

   67 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/backtrace.rb

   68 c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake.rb

   69 c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test-unit.rb

   70
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security/windows/constants.rb

   71 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi_c.so

   72 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/platform.rb

   73 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/types.rb

   74 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/library.rb

   75 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/errno.rb

   76 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/pointer.rb

   77 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/memorypointer.rb

   78
c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/struct_layout_builder.rb

   79 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/struct.rb

   80 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/union.rb

   81 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/managedstruct.rb

   82 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/callback.rb

   83 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/io.rb

   84 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/autopointer.rb

   85 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/variadic.rb

   86 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/enum.rb

   87 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi/ffi.rb

   88 c:/ruby264/lib/ruby/gems/2.0.0/gems/ffi-1.9.0/lib/ffi.rb

   89
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security/windows/structs.rb

   90
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security/windows/functions.rb

   91 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/socket.so

   92 c:/ruby264/lib/ruby/2.0.0/socket.rb

   93
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security/sid.rb

   94
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security/acl.rb

   95
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-security-0.2.4/lib/win32/security.rb

   96 C:/Users/djberge/Repositories/win32-file/lib/win32/file/constants.rb

   97 C:/Users/djberge/Repositories/win32-file/lib/win32/file/structs.rb

   98 C:/Users/djberge/Repositories/win32-file/lib/win32/file/functions.rb

   99
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/windows/helper.rb

  100
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/windows/constants.rb

  101
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/windows/structs.rb

  102
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/windows/functions.rb

  103 c:/ruby264/lib/ruby/2.0.0/prettyprint.rb

  104 c:/ruby264/lib/ruby/2.0.0/pp.rb

  105
c:/ruby264/lib/ruby/gems/2.0.0/gems/win32-file-stat-1.4.0/lib/win32/file/stat.rb

  106 C:/Users/djberge/Repositories/win32-file/lib/win32/file.rb

  107
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/attribute.rb

  108
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/fixture.rb

  109
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/exceptionhandler.rb

  110
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/assertionfailederror.rb

  111
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/util/backtracefilter.rb

  112
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/util/method-owner-finder.rb

  113
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/diff.rb

  114
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/assertions.rb

  115
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/failure.rb

  116
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/error.rb

  117
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/pending.rb

  118
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/omission.rb

  119
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/notification.rb

  120
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/priority.rb

  121
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/data.rb

  122
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/testsuite.rb

  123
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/testsuitecreator.rb

  124
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/util/output.rb

  125
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/testcase.rb

  126
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/color.rb

  127
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/color-scheme.rb

  128
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/attribute-matcher.rb

  129
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/runner/console.rb

  130
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/runner/emacs.rb

  131
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/runner/xml.rb

  132
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/autorunner.rb

  133 c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit.rb

  134 C:/Users/djberge/Repositories/win32-file/test/test_win32_file_link.rb

  135 C:/Users/djberge/Repositories/win32-file/test/test_win32_file_path.rb

  136 c:/ruby264/lib/ruby/2.0.0/x64-mingw32/enc/trans/single_byte.so

  137 C:/Users/djberge/Repositories/win32-file/test/test_win32_file_stat.rb

  138
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/ui/console/outputlevel.rb

  139
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/collector.rb

  140
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/collector/descendant.rb

  141
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/code-snippet-fetcher.rb

  142
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/fault-location-detector.rb

  143
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/ui/testrunnerutilities.rb

  144
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/ui/testrunner.rb

  145
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/util/procwrapper.rb

  146
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/util/observable.rb

  147
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/testresult.rb

  148
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/ui/testrunnermediator.rb

  149
c:/ruby264/lib/ruby/gems/2.0.0/gems/test-unit-2.5.5/lib/test/unit/ui/console/testrunner.rb



[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





This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

rake aborted!

Command failed with status (3): [ruby -w -I"lib"
-I"c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib"
"c:/ruby264/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/rake_test_loader.rb"
"test/test*.rb" ]



Tasks: TOP => default => test:all

(See full trace by running task with --trace)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20131120/229928f7/attachment-0001.html>


More information about the win32utils-devel mailing list