Bug #12237 » 0001-thread.c-update_coverage-Do-not-track-coverage-in-lo.patch
| ChangeLog | ||
|---|---|---|
| Thu Mar 31 22:54:52 2016  Benoit Daloze  <eregontp@gmail.com> | ||
| 	* 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. | ||
| Thu Mar 31 19:16:16 2016  Koichi Sasada  <ko1@atdot.net> | ||
| 	* gc.c: need to set initial value of GC_HEAP_FREE_SLOTS_GOAL_RATIO. | ||
| ext/coverage/coverage.c | ||
|---|---|---|
|     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) | ||
| { | ||
| thread.c | ||
|---|---|---|
|     if (RB_TYPE_P(coverage, T_ARRAY) && !RBASIC_CLASS(coverage)) { | ||
| 	long line = rb_sourceline() - 1; | ||
| 	long count; | ||
| 	if (RARRAY_AREF(coverage, line) == Qnil) { | ||
| 	if (line >= RARRAY_LEN(coverage)) { /* no longer tracked */ | ||
| 	    return; | ||
| 	} | ||
| 	count = FIX2LONG(RARRAY_AREF(coverage, line)) + 1; | ||
- « Previous
- 1
- 2
- Next »