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

gcov: fix gcov functions always declared as dummy #5028

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Mar 9, 2022

Currently, the check to enable gcov relies on a non-existent macro due
to a typo, which looks like it would cause the dummy/empty versions of
the gcov functions to always be declared (even with --enable-gcov),
instead of the real ones from gcov.h. This commit fixes the typo
(HAS_GCOV -> HAVE_GCOV). See configure.ac for the macro declaration.

This amends commit 5106b2e ("gcov: use no-op functions if not
enabled", 2021-06-20) / PR #4376.

Occurrences of each macro with this commit applied:

$ git grep -F HAVE_GCOV | wc -l
16
$ git grep -F HAS_GCOV | wc -l
0

Currently, the check to enable gcov relies on a non-existent macro due
to a typo, which looks like it would cause the dummy/empty versions of
the gcov functions to always be declared (even with --enable-gcov),
instead of the real ones from gcov.h.  This commit fixes the typo
(HAS_GCOV -> HAVE_GCOV).  See configure.ac for the macro declaration.

This amends commit 5106b2e ("gcov: use no-op functions if not
enabled", 2021-06-20) / PR netblue30#4376.

Occurrences of each macro with this commit applied:

    $ git grep -F HAVE_GCOV | wc -l
    16
    $ git grep -F HAS_GCOV | wc -l
    0
@kmk3
Copy link
Collaborator Author

kmk3 commented Mar 9, 2022

This amends commit 5106b2e ("gcov: use no-op functions if not enabled",
2021-06-20) / PR #4376.

The commit that introduces the typo is from over 8 months ago and the only
other gcov-related commit since then that I found is commit b8d282c ("gcov",
2022-01-17) by @smitsohu.

So it looks like either the typo wasn't an issue or that no one has tried using
gcov since #4376.

IIRC I tried testing gcov when working on #4373/#4376 but couldn't get it to
work.

And with that I wonder, does anyone actually test firejail with gcov? When was
the last time anyone tried doing that? It does not seem to be hooked up in
tests or ci, so I assume that it has to be done manually.

@smitsohu
Copy link
Collaborator

smitsohu commented Mar 10, 2022

@kmk3 TBH I sent b8d282c just because I realized that I had broken a pattern.

IIRC I tried testing gcov when working on #4373 but couldn't get it to
work.

Same here. If someone knows how to hold it - any hints would be appreciated.

@netblue30 netblue30 merged commit 1a901b7 into netblue30:master Mar 11, 2022
@netblue30
Copy link
Owner

merged, thanks!

@kmk3 kmk3 deleted the fix-gcov-macro branch March 11, 2022 19:35
kmk3 added a commit that referenced this pull request Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

3 participants