https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-12-15T22:59:57ZRuby Issue Tracking SystemRuby master - Bug #14191: Coverage decreased between 2.4.3 and 2.5.0rc1https://bugs.ruby-lang.org/issues/14191?journal_id=684532017-12-15T22:59:57Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>mame (Yusuke Endoh)</i></li><li><strong>Target version</strong> set to <i>2.5</i></li></ul><p>Thank you for the report!</p>
<p>I found that <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Remove `trace` instructions (Closed)" href="https://bugs.ruby-lang.org/issues/14104">#14104</a> changed TracePoint's lineno, which broke coverage.so. I'll fix it with ko1.</p> Ruby master - Bug #14191: Coverage decreased between 2.4.3 and 2.5.0rc1https://bugs.ruby-lang.org/issues/14191?journal_id=684832017-12-18T02:44:47Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r61313.</p>
<hr>
<p>iseq.c (finish_iseq_build): fix coverage leakage [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Coverage decreased between 2.4.3 and 2.5.0rc1 (Closed)" href="https://bugs.ruby-lang.org/issues/14191">#14191</a>]</p>
<p>Before this change, coverage.so had failed to measure some multiple-line<br>
code fragments. This is because removing trace instructions (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Remove `trace` instructions (Closed)" href="https://bugs.ruby-lang.org/issues/14104">#14104</a>)<br>
changed TracePoint's lineno (new lineno), and coverage counter array was<br>
based on old lineno.<br>
This change initializes coverage counter array based on new lineno.</p> Ruby master - Bug #14191: Coverage decreased between 2.4.3 and 2.5.0rc1https://bugs.ruby-lang.org/issues/14191?journal_id=684842017-12-18T02:57:32Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>I have just fixed the issue. I'd appreciate if you could try r61313 and tell me if the coverage is measured correctly.</p>
<p>Your report was <em>really</em> helpful. Thank you very much!</p> Ruby master - Bug #14191: Coverage decreased between 2.4.3 and 2.5.0rc1https://bugs.ruby-lang.org/issues/14191?journal_id=685412017-12-20T04:35:30Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>Sangyong Sim told me that 2.5's line coverage measurement was slower than 2.4 because of some reasons. I talked with ko1, and decided to revert the changes of line coverage (2.4 and 2.5 use a special event and special instruction for line coverage). I committed r61350. This change also means that line numbers are back to 2.4. In short, everything about 2.5's line coverage should be the same as 2.4.</p>