pragtob / gmail.com wrote:
> issue" means, but I'm relatively certain that it's a bug in
> Ruby we managed to reproduce it without any simplecov involved
> purely using the coverage library:
> https://github.com/colszowka/simplecov/issues/652#issuecomment-362436552

I couldn't reproduce it (using Coverage directly), but I suspect
the following patch is a fix for more aggressive compilers:

```
diff --git a/thread.c b/thread.c
index 23957eba09..3c8d77ddd8 100644
--- a/thread.c
+++ b/thread.c
@@ -5188,6 +5188,7 @@ rb_reset_coverages(void)
 {
     VALUE coverages = rb_get_coverages();
     st_foreach(rb_hash_tbl_raw(coverages), reset_coverage_i, 0);
+    RB_GC_GUARD(coverages);
     GET_VM()->coverages = Qfalse;
     rb_remove_event_hook((rb_event_hook_func_t) update_line_coverage);
     if (GET_VM()->coverage_mode & COVERAGE_TARGET_BRANCHES) {
```

Can you give it a shot?  Thanks

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>