From: Eric Wong Date: 2018-02-02T19:13:44+00:00 Subject: [ruby-core:85352] Re: [Ruby trunk Bug#14334] Segmentation fault after running rspec (ruby/2.5.0/erb.rb:885 / simplecov/source_file.rb:85) 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: