# Lost covered lines, empty tags are gone

**URL:** <https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672>\
**Category:** Bug Fixes\
**Created:** [March 22, 2021, 1:01pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672 "2021-03-22T13:01:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AenBleidd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/aenbleidd/32/645_2.png) [@AenBleidd](https://community.codecov.com/u/AenBleidd)\
**Post date:** [March 22, 2021, 1:01pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672/1 "2021-03-22T13:01:20Z")

</div>

Hello,

There are basically two issues I’m facing now:  
1 - Some files that has coverage are missed from the report (I can’t say for sure but looks like data is present in gcov file).  
2 - We have several flags configured in yml but if there is no coverage for certain flags, they are missed from the report and thus overall code coverage in increased (that is definitely wrong).

Here’s the coverage report where everything was ok (correct report):

> **[Code coverage done right.](https://codecov.io/gh/BOINC/boinc/tree/51ec5b701537af943a376814fe62d051f603cbb6)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Here’s the broken coverage report:

> **[Code coverage done right.](https://codecov.io/gh/BOINC/boinc/tree/efbcee21815ded2915ec048f0224ab93ffca25d9)**
>
> Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

For me it looks like the behavior of coverage parsing engine of Codecov was changed.

Thanks in advance for you help.

— Update —

‘Good’ coverage report was generated on Ubuntu 18.04 (gcov (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0)  
‘Bad’ coverage report was generated on Ubuntu 20.04 (gcov (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0)

---

<div class="post-metadata">

**Author:** ![AenBleidd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/aenbleidd/32/645_2.png) [@AenBleidd](https://community.codecov.com/u/AenBleidd)\
**Post date:** [March 24, 2021, 10:15pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672/2 "2021-03-24T22:15:48Z")

</div>

Ok, the latest update.  
On gcov 7.5.0 when source file is not found (and this is true because codecov is always running from the root folder, and src/gcda/gcno could be in subfolder), gcov file is generated **with** lines that has hit number but no source, and this file is processed correctly by codecov.  
On gcov 9.3.0 (I didn’t check versions between 7.5.0 and 9.3.0) when source file is not found, gcov file is generated **empty** (ok, almost empty, but the main is that it doesn’t contains any lines with hit number).  
Looks like this is either a regression of gcov (I briefly took a look at gcov 10.2.0 and looks like it still have the same broken behavior) or a feature.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [March 25, 2021, 5:00pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672/3 "2021-03-25T17:00:32Z")

</div>

@AenBleidd any update here? I looked at the raw coverage reports and I noticed that the `bad` coverage report is missing coverage on files. As an example, on `db/db_base.cpp` the `good` coverage has this

```auto
# path=^#db#db_base.cpp.gcov.reduced
        -: 0:Source:../db/db_base.cpp
func
func
1:36:
1:37:
1:38:
func
func
...

```

while the `bad` coverage has

```auto
# path=^#db#db_base.cpp.gcov.reduced
        -: 0:Source:../db/db_base.cpp
<<<<<< EOF

```

This leads me to believe there is an issue with coverage generation on `gcov`

---

<div class="post-metadata">

**Author:** ![AenBleidd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/aenbleidd/32/645_2.png) [@AenBleidd](https://community.codecov.com/u/AenBleidd)\
**Post date:** [March 25, 2021, 5:13pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672/4 "2021-03-25T17:13:56Z")

</div>

@tom, exactly, but not sure it’s an issue, for me it looks like a feature of them and they now require to run gcov from the folder where all three files are present:

- gcda
- gcno
- source file

---

<div class="post-metadata">

**Author:** ![AenBleidd](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/aenbleidd/32/645_2.png) [@AenBleidd](https://community.codecov.com/u/AenBleidd)\
**Post date:** [March 27, 2021, 11:48pm UTC](https://community.codecov.com/t/lost-covered-lines-empty-tags-are-gone/2672/5 "2021-03-27T23:48:33Z")

</div>

Ok, this is called ‘read documentation first before reporting bugs’.

Since gcc 8.1.0 release, source file is needed to generate correct coverage report.  
New compilation flag `-fprofile-abs-path` was introduced to preserve correct path to source file in \*.gcno file.

Ticket could be closed now (probably as invalid)
