Bug #10941
closedSIGSEGV caused by Rake on Windows
Description
Ruby 2.2.1
Windows 7
Compiled with VS 2013
I'm getting a segfault when trying to run the default (test) task for a project called file-find:
https://github.com/djberg96/file-find
It's a fairly simple project, and the relevant tasks in the Rakefile look like this:
CLEAN.include("**/*.gem", "**/*.rbc", "**/link*")
Rake::TestTask.new do |t|
task :test => 'clean'
t.warning = true
t.verbose = true
end
task :default => :test
When I step through the rake code, it seems to choke here
C:/Ruby22VC/lib/ruby/2.2.0/rake/task.rb:172: @lock.synchronize do
I'm not sure how to narrow it down any further. Please let me know if there's any more information I can provide.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: REQUIRED
I succeeded to reproduce this with 2.1.5 and trunk (but not with 2.0.0).
Minimum case is simple:
C:\foo> mkdir test
C:\foo> copy con Rakefile
task :default => :test
^Z
C:\foo> rake
Updated by usa (Usaku NAKAMURA) over 9 years ago
Oops, sorry, some lines are missed.
Correct minimum case is:
require 'rake/clean'
require 'rake/testtask'
Rake::TestTask.new do |t|
task :test => 'clean'
end
task :default => :test
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Backport changed from 2.0.0: DONTNEED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED
My rake batchfile of 2.1.5 ran trunk ruby...
There is no problem in 2.1.5.
I succeeded to reproduce this more simple case:
C:\> ruby -e "" test\test_*.rb
So, rake is not needed.
This is a problem of commandline grobbing processing.
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r49859.
- dir.c (replace_real_basename): shouldn't create Ruby object before
the object system is loaded.
[ruby-core:68430] [Bug #10941]
Updated by usa (Usaku NAKAMURA) over 9 years ago
- Has duplicate Bug #10978: [mswin32, mswin64] SignalException: SIGSEGV added
Updated by nobu (Nobuyoshi Nakada) over 9 years ago
- Has duplicate Bug #11089: 2.2.2p95 crash on Windows when passed glob patterns on command line added
Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago
- Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE
Backported into ruby_2_2
branch at r50545.