Permalink
Browse files

Patching against segfault bug with rspec

  • Loading branch information...
1 parent 9376a02 commit e3918d63e739fa58c8b4a20c2455011f8ce6c6de Sylvestre Mergulhao committed Aug 29, 2008
Showing with 27 additions and 5 deletions.
  1. +20 −0 README
  2. +3 −1 ext/rcovrt/rcovrt.c
  3. +2 −2 lib/rcov/version.rb
  4. +2 −2 rcov-0.8.1.2.0.gemspec → rcov-0.8.1.3.0.gemspec
View
20 README
@@ -0,0 +1,20 @@
+Rcov with segfault bug patched
+==============================
+
+Many people are having this problem when using rcov and rspec:
+
+http://rspec.lighthouseapp.com/projects/5645/tickets/309-fix-for-rcov-segfault-2
+
+Fortunately a good guy wrote a patch:
+
+http://tomcopeland.blogs.com/juniordeveloper/2008/08/rcov-crashing-w.html
+
+And now we have a rcov gem with that patch:
+
+ $ gem sources -a http://gems.github.com (you only have to do this once)
+ $ sudo gem install mergulhao-rcov
+
+Hope this helps someone.
+
+Sylvestre Mergulhao
+http://mergulhao.info
View
@@ -64,7 +64,9 @@ coverage_increase_counter_uncached(char *sourcefile, unsigned int sourceline,
if(!carray->ptr[sourceline])
carray->ptr[sourceline] = 1;
} else {
+ if (carray && carray->len > sourceline) {
carray->ptr[sourceline]++;
+ }
}
return carray;
@@ -98,7 +100,7 @@ coverage_mark_caller()
static void
coverage_increase_counter_cached(char *sourcefile, int sourceline)
{
- if(cached_file == sourcefile && cached_array) {
+ if(cached_file == sourcefile && cached_array && cached_array->len > sourceline) {
cached_array->ptr[sourceline]++;
return;
}
View
@@ -4,8 +4,8 @@
module Rcov
-VERSION = "0.8.1.2"
-RELEASE_DATE = "2007-11-22"
+VERSION = "0.8.1.3"
+RELEASE_DATE = "2008-08-29"
RCOVRT_ABI = [2,0,0]
UPSTREAM_URL = "http://eigenclass.org/hiki/rcov"
@@ -1,11 +1,11 @@
Gem::Specification.new do |s|
s.name = %q{rcov}
- s.version = "0.8.1.2.0"
+ s.version = "0.8.1.3.0"
s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
s.authors = ["Mauricio Fernandez"]
s.cert_chain = nil
- s.date = %q{2007-11-21}
+ s.date = %q{2008-08-29}
s.default_executable = %q{rcov}
s.description = %q{rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test unit coverage of target code. It features fast execution (20-300 times faster than previous tools), multiple analysis modes, XHTML and several kinds of text reports, easy automation with Rake via a RcovTask, fairly accurate coverage information through code linkage inference using simple heuristics, colorblind-friendliness...}
s.email = %q{mfp@acm.org}

0 comments on commit e3918d6

Please sign in to comment.