[LLVMbugs] [Bug 11809] New: --coverage writes the .gcda files to the wrong directory
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jan 20 03:36:50 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11809
Bug #: 11809
Summary: --coverage writes the .gcda files to the wrong
directory
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: magnus.reftel at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7911
--> http://llvm.org/bugs/attachment.cgi?id=7911
Hello world + shell script that demonstrates the difference
When a program built with gcc --coverage runs, the .gcda files are written to
(subdirectories of) the directory where the binary resides. When a program
built with clang --coverage runs, the .gcda files are written to
(subdirectories of) the directory where the binary resides, unless the program
called chdir. If the program called chdir, then the files are instead written
to (subdirectories of) the directory to which the program changed.
This means that it's not possible to predict where the .gcda files will end up,
unless the calls to chdir that the program may make can be predicted.
The attached test case builds a hello world program with Clang and GCC and runs
if from different directories, with and without changing directory to
illustrate the difference in behaviour.
This problem was found in r148114.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list