Clang produces malformed coverage mapping data
| 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.
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.