Giter Site home page Giter Site logo

lcov fails with gcc 14 about lcov HOT 1 OPEN

Klaus33333 avatar Klaus33333 commented on September 8, 2024
lcov fails with gcc 14

from lcov.

Comments (1)

henry2cox avatar henry2cox commented on September 8, 2024

I fear that I'm not entirely sure which fixes/workarounds you are looking for.
It appears that we see two different errors/inconsistencies in the gcov data for this testcase:

  1. function _ZN17TEST1_SUITE1_Test8TestBodyEv is found to end on line .../test1.cpp:9 in one GCDA file but is found to end on line 19 in another file.
    This appears to be a bug in gcov (or in gcc) which turns up sometimes (...which is why lcov checks for it).
    lcov uses the function range to figure out which coverpoints belong to the function, in order to support function-level exclusion and also to report covered proportions.
    You can safely ignore the error if you don't care about those features.
    To work around it is a bit painful - as you would have to manually fix the start/end lines (e.g., via sed on the data file)...or possibly someone can fix it in gcc/gcov.

  2. The gcov output data is not consistent at line file1.c:2811.
    I fear that I have forgotten the details, but the comment near line geninfo:2324 suggests that the report will look weird because we will see a block inside some conditional (say, the 'if' clause) such that the 'if' expression is not evaluated but the statement is hit.
    The suggested workaround is to tell geninfo to set the block hit count to zero when that happens (or gcc/gcov need to fix the bug).
    To see how the second issue affects your coverage report: capture your coverage data twice - once setting the count and once without, then generate a differential coverage report (genhtml -o whatTheHeck --baseline-file without.info with.info ...) and inspect the differences.

from lcov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.