summaryrefslogtreecommitdiff
path: root/ext/coverage
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-31 16:14:52 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-31 16:14:52 +0000
commit8dd2435877fae9b13b107cb306c0f4d723451f20 (patch)
tree485b1d45dffd9562a1c3bd98e6c8b5a2289b6e05 /ext/coverage
parentf0060b81c672e5f80ffed1b3a979d218b49e1021 (diff)
* thread.c (update_coverage): Do not track coverage in loaded files
after Coverage.result. Avoids out-of-bounds access. [Bug #12237] * ext/coverage/coverage.c (coverage_clear_result_i): document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/coverage')
-rw-r--r--ext/coverage/coverage.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index 0c7755b..f621280 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -32,6 +32,7 @@ rb_coverage_start(VALUE klass)
return Qnil;
}
+/* Make coverage arrays empty so old covered files are no longer tracked. */
static int
coverage_clear_result_i(st_data_t key, st_data_t val, st_data_t h)
{