llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Clang produces malformed coverage mapping data

Open vedantk opened this issue 10 years ago • 2 comments

Bugzilla Link 27170
Version 3.8
OS All
CC @bogner

Extended Description

Simple reproducer:

$ echo "void foo() {}" | ./bin/clang -x c -fprofile-instr-generate -fcoverage-mapping - -c -o - | ./bin/llvm-cov show - -instr-profile=none error: Failed to load coverage: Malformed coverage data

Bisected to: r230676

This issue was fixed on trunk after r260117, but it affects llvm 3.8.

vedantk avatar Mar 31 '16 22:03 vedantk

The revised bug (output of creduce) demonstrates a problem. The concern of the first bug was a mistake because it was not correctly accounting for relocation information.

In this version (bug-e.cpp, attachment 16202) however, compiled with release 3.8, the symbol _profn__ZN8facebook8adsatlas20AtlasSliceDataThriftaSEOS1 is put in the read only data section instead of the __llvm_prf_names section which breaks the llvm-cov tool.

llvmbot avatar Apr 11 '16 17:04 llvmbot

Revised bug

llvmbot avatar Apr 11 '16 17:04 llvmbot