Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm-cov cannot open GCOV coverage generated by clang #22810

Closed
llvmbot opened this issue Feb 2, 2015 · 2 comments
Closed

llvm-cov cannot open GCOV coverage generated by clang #22810

llvmbot opened this issue Feb 2, 2015 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 2, 2015

Bugzilla Link 22436
Resolution FIXED
Resolved on Mar 18, 2015 12:59
Version 3.6
OS Linux
Attachments Testcase, Test code, A solution for when GCDA has exit block edges.
Reporter LLVM Bugzilla Contributor
CC @bogner

Extended Description

When llvm-cov tries to open an .gcda file created by clang the following error is showed:

warning: Using the gcov compatible mode (this behaviour may be dropped in the future).
Unexpected number of edges (in _Z4testi).
Invalid .gcda File!

And when I tried to open with gcov (4.6.4) the following message appeared:

test.gcno:version '402*', prefer '406*'
test.gcda:version '402*', prefer version '406*'
test.gcno:'_Z4testi' has arcs from exit block
test.gcno:'main' has arcs from exit block
File 'test.cpp'
Lines executed:83.33% of 6
test.cpp:creating 'test.cpp.gcov'

@bogner
Copy link
Contributor

bogner commented Mar 17, 2015

So I am planning on applying something like the patch that's here, as it makes sense to warn instead of failing, but the real problem is that clang's generating bogus coverage data right now.

In r223193 we started emitting the exit block second instead of last, but this isn't compatible with how gcov worked before 4.7 or 4.8. Since we claim we're generating gcov 4.2 compatible output, the gcov data we're outputting is pretty bogus. Some discussion of this is ongoing on the r223193 review thread:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150309/265388.html

@bogner
Copy link
Contributor

bogner commented Mar 17, 2015

This should be fixed by r232438 - clang emits the 4.2 compatible coverage that llvm-cov understands by default again.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants