linux-test-project / lcov

LCOV
GNU General Public License v2.0
866 stars 234 forks source link

Fix bug in genhtml when identifying new code in functions #265

Closed vinicpac closed 5 months ago

vinicpac commented 5 months ago

In this portion of code, $line is referring to the line in the current code (i.e. $linemap->NEW). Therefore, when using $linemap->lookup, we should indicate this instead.

henry2cox commented 5 months ago

Thanks for the fix - To save me the effort of paging this code back into my memory: do you happen to have a testcase that exhibits the bug (or a modification to an existing test, to make it sensitive to the bug)? As is, the tests appear to pass, with and without the fix. Where possible, I am trying to increase the test coverage/sensitivity of the lcov regression suite.

Henry

vinicpac commented 5 months ago

Happy to help, Henry :) I got this bug while working on a confidential codebase, but I'm probably able to create a testcase to catch it. I'll work on this later this week.

Regards, Vinícius

henry2cox commented 5 months ago

Hi - I'd still like to see a testcase if possible...but I guess no reason to wait longer. Worst case: we are no worse off than we were before. Henry