[LLVMbugs] [Bug 17114] New: missing check if .gcda file has the expected number of basic blocks for a function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 5 14:55:16 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17114

            Bug ID: 17114
           Summary: missing check if .gcda file has the expected number of
                    basic blocks for a function
           Product: compiler-rt
           Version: unspecified
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: bob.wilson at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

According to the gcov man page:

"For each source file compiled with -fprofile-arcs, the profiling code first
attempts to read in an existing .gcda file; if the file doesn't match the
executable (differing number of basic block counts) it will ignore the contents
of the file."

LLVM's implementation seems to be missing that check.  If you have a stale
.gcda file that gets read in to have its counts updated, bad things can happen
if the code has changed and there are a different number of basic blocks.

I noticed this by inspection and don't have a test case, but it shouldn't be
hard to make one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130905/36af8a91/attachment.html>


More information about the llvm-bugs mailing list