[llvm-bugs] [Bug 43058] New: [DebugInfo at O2] LiveDebugValues: Spill restores don't check location discriminator
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 20 02:13:02 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43058
Bug ID: 43058
Summary: [DebugInfo at O2] LiveDebugValues: Spill restores don't
check location discriminator
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Keywords: wrong-debug
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: jeremy.morse.llvm at gmail.com
CC: aprantl at apple.com, chackz0x12 at gmail.com,
greg.bedwell at sony.com, llvm-bugs at lists.llvm.org,
orlando.hyams at sony.com, paul.robinson at am.sony.com,
stephen.tozer at sony.com, vsk at apple.com
Blocks: 31268
Carrot Wei writes in the llvm-commits discussion for r368339, here:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190819/685357.html
There are following code in
function LiveDebugValues::transferSpillOrRestoreInst,
854 } else if (TKind == TransferKind::TransferRestore &&
855 VarLocIDs[ID].Loc.SpillLocation == *Loc) {
856 LLVM_DEBUG(dbgs() << "Restoring Register " << printReg(Reg,
TRI) << '('
857 << VarLocIDs[ID].Var.getVar()->getName() <<
")\n");
There is no checking of VarLocIDs[ID].Kind before the usage of
VarLocIDs[ID].Loc.SpillLocation, is this another bug?
This is certainly a bug, and one we should fix: the VarLoc discriminator should
be checked to ensure the "Loc" union contains data of the expected type. As
it's a one-liner and obviously broken, I was just going to drop a commit in
that fixed this; however comparing a clang-3.4 build with/without that change
based on r369117, the "scope bytes covered" statistic from `llvm-dwarfdump
--statistics` jumps from 46% to 54%, which is too good to be true.
My hunch is that this bug is masking the effects of bug 42772, which would
explain the sudden increase in code coverage; only 15% confidence though.
Additional investigation of what effect this change has is needed IMO.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=31268
[Bug 31268] Umbrella: debug info for optimized code
--
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/20190820/f3b0a8c3/attachment-0001.html>
More information about the llvm-bugs
mailing list