[llvm-bugs] [Bug 40884] New: [coverage] linker failure with dead code stripping
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 27 06:14:11 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40884
Bug ID: 40884
Summary: [coverage] linker failure with dead code stripping
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Keywords: compile-fail, miscompilation
Severity: normal
Priority: P
Component: Tooling
Assignee: unassignedclangbugs at nondot.org
Reporter: stefan.schmidt-bilkenroth at gemalto.com
CC: llvm-bugs at lists.llvm.org
This is related to Bug 37561. The bug is fixed now, but I get linker errors
(lld-link) when building teh project with optimizer (for release).
lld-link reports about an error with relocation against "symbol" in discarded
section. This was triggered by a global function calling sprintf(), which was
not referenced. After I removed the function or replaced sprintf() with
snprintf(), linker did not complain, but the unit test was failing.
When building for Debug, the linker also did not complain, the unit test was
passing and I was able to create the coverage report.
Looks to me like dead code stripping is leading to dangling references and also
the Optimizer may cause code corruptions.
I hope Marius can reproduce the issue with his project, as I can hardly share
mine and it comes with a lot of references in our repository.
SSB
--
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/20190227/8409480f/attachment-0001.html>
More information about the llvm-bugs
mailing list