[LLVMbugs] [Bug 22575] New: llvm-cov report crashed when a source file is indicated
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Feb 13 01:50:42 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22575
Bug ID: 22575
Summary: llvm-cov report crashed when a source file is
indicated
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: xeioexception at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The issue could be related to bug 22531.
Environment+Setup:
clang -v
clang version 3.7.0 (trunk 228136)
Target: x86_64-unknown-linux-gnu
Thread model: posix
build: Debug+Asserts
OS: ubuntu 14.04 x86_64
Steps to Reproduce:
# The issue obviously does not relate to nginx,
# but I could not reproduce it on simple snippets
git clone https://github.com/nginx/nginx
cd nginx
git checkout v1.7.10
CC=clang LD=clang CFLAGS='-g -O0 -fprofile-instr-generate -fcoverage-mapping'
auto/configure --with-ld-opt='-fcoverage-mapping -fprofile-instr-generate'
--with-debug
make -j8
config example:
===========================
daemon off;
master_process off;
http {
server {
listen 8081;
}
}
events {
worker_connections 768;
}
===========================
objs/nginx -c conf/nginx.conf
llvm-profdata merge -o test.profdata default.profraw
# works fine
llvm-cov report ./objs/nginx -instr-profile=test.profdata
warning: 1280 functions have mismatched data.
Filename Regions Miss Cover Functions Executed
-----------------------------------------------------------------------
...nx-se/src/core/nginx.c 661 435 34.19% 15 53.33%
...e/src/core/ngx_array.c 42 14 66.67% 4 75.00%
...
...rc/os/unix/ngx_shmem.c 25 25 0.00% 2 0.00%
...c/os/unix/ngx_socket.c 8 6 25.00% 4 25.00%
...src/os/unix/ngx_time.c 4 2 50.00% 4 50.00%
...os/unix/ngx_udp_recv.c 34 34 0.00% 1 0.00%
...src/os/unix/ngx_user.c 23 23 0.00% 1 0.00%
...nix/ngx_writev_chain.c 135 96 28.89% 3 66.67%
-----------------------------------------------------------------------
TOTAL 49172 39830 19.00% 1346 30.01%
#crash
llvm-cov report ./objs/nginx -instr-profile=test.profdata src/http/ngx_http.c
warning: 1280 functions have mismatched data.
File '/home/xeioex/workspace/nginx/nginx-se/src/core/nginx.c':
Name Regions Miss Cover Lines Miss Cover
-----------------------------------------------------------------------------
%�%�... 2679 26791300276.22% 2679 2679 inf%
2679 2679 100.00% 2679 2679 inf%
... 3 3 100.00% 3 3 inf%
0 3 inf% 0 0 -nan%
0 0 -nan% 0 0 -nan%
3 0 100.00% 3 0 0.00%
0 0 inf% 2679 3 -nan%
... 0 0 -nan% 2679 2679 inf%
... 2679 2679 100.00% 2679 2679 inf%
0 0 -nan% 0 0 -nan%
0 0 -nan% 2679 0 -nan%
llvm-cov: /home/xeioex/workspace/clang/llvm/include/llvm/ADT/StringRef.h:79:
llvm::StringRef::StringRef(const char *, size_t): Assertion `(data || length ==
0) && "StringRef cannot be built from a NULL argument with non-null length"'
failed.
#0 0x4ca98e llvm::sys::PrintStackTrace(_IO_FILE*)
/home/xeioex/workspace/clang/llvm/lib/Support/Unix/Signals.inc:422:0
#1 0x4cb74b PrintStackTraceSignalHandler(void*)
/home/xeioex/workspace/clang/llvm/lib/Support/Unix/Signals.inc:481:0
#2 0x4cd504 SignalHandler(int)
/home/xeioex/workspace/clang/llvm/lib/Support/Unix/Signals.inc:198:0
#3 0x7ff807eb9340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x7ff806ecccc9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x7ff806ed00d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#6 0x7ff806ec5b86 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#7 0x7ff806ec5c32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#8 0x40e7e7 llvm::StringRef::StringRef(char const*, unsigned long)
/home/xeioex/workspace/clang/llvm/include/llvm/ADT/StringRef.h:80:0
#9 0x41cabc llvm::StringRef::substr(unsigned long, unsigned long) const
/home/xeioex/workspace/clang/llvm/include/llvm/ADT/StringRef.h:404:0
#10 0x41ca0e (anonymous namespace)::Column::render(llvm::raw_ostream&) const
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CoverageReport.cpp:74:0
#11 0x41af5d (anonymous namespace)::operator<<(llvm::raw_ostream&, (anonymous
namespace)::Column const&)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CoverageReport.cpp:50:0
#12 0x41b388 llvm::CoverageReport::render(llvm::FunctionCoverageSummary const&,
llvm::raw_ostream&)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CoverageReport.cpp:133:0
#13 0x41bc60 llvm::CoverageReport::renderFunctionReports(llvm::raw_ostream&)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CoverageReport.cpp:177:0
#14 0x407f90 (anonymous namespace)::CodeCoverageTool::report(int, char const**,
std::function<int (int, char const**)>)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CodeCoverage.cpp:471:0
#15 0x405a0a (anonymous namespace)::CodeCoverageTool::run((anonymous
namespace)::CodeCoverageTool::Command, int, char const**)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CodeCoverage.cpp:341:0
#16 0x405b99 reportMain(int, char const**)
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/CodeCoverage.cpp:481:0
#17 0x42b6e3 main
/home/xeioex/workspace/clang/llvm/tools/llvm-cov/llvm-cov.cpp:60:0
#18 0x7ff806eb7ec5 __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:321:0
#19 0x405109 _start
(/home/xeioex/workspace/clang/build-r228916/Debug+Asserts/bin/llvm-cov+0x405109)
Stack dump:
0. Program arguments: llvm-cov report ./objs/nginx -instr-profile=test.profdata
src/http/ngx_http.c
--
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/20150213/4a8c907b/attachment.html>
More information about the llvm-bugs
mailing list