[LLVMbugs] [Bug 20986] New: gcda (gcov data) writer is not multi-process-safe, impacting coverage analysis and profiling of programs that fork()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 17 15:22:12 PDT 2014


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

            Bug ID: 20986
           Summary: gcda (gcov data) writer is not multi-process-safe,
                    impacting coverage analysis and profiling of programs
                    that fork()
           Product: compiler-rt
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: mark at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

llvm/projects/compiler-rt/lib/profile/GCDAProfiling.c says:

|* TODO: gcov is multi-process safe by having each exit open the existing file
|* and append to it. We'd like to achieve that and be thread-safe too.

(http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?revision=215933&view=markup#l18)

I believe that this is causing a problem for test coverage analysis when the
test framework implements death tests in the way that gtest (googletest) does,
either as fork()-based or fork()-exec()-based. These are described as “fast”
and “threadsafe” respectively in
https://code.google.com/p/googletest/wiki/AdvancedGuide#How_It_Works.

Regardless, I didn’t find a bug tracking this TODO, and it seems like there
should probably be 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/20140917/7f63dc63/attachment.html>


More information about the llvm-bugs mailing list