<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Possible valgrind error in LiveDebugValues"
href="https://llvm.org/bugs/show_bug.cgi?id=28631">28631</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Possible valgrind error in LiveDebugValues
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dcb314@hotmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=16775" name="attach_16775" title="C source code">attachment 16775</a> <a href="attachment.cgi?id=16775&action=edit" title="C source code">[details]</a></span>
C source code
The attached C code, when compiled by recent clang, and
the flags -g -O3, does this:
==2065== Conditional jump or move depends on uninitialised value(s)
==2065== at 0x2530C8E: std::_Rb_tree<(anonymous
namespace)::LiveDebugValues::VarLoc, std::pair<(anonymous
namespace)::LiveDebugValues::VarLoc const, unsigned int>,
std::_Select1st<std::pair<(anonymous namespace)::LiveDebugValues::VarLoc const,
unsigned int> >, std::less<(anonymous namespace)::LiveDebugValues::VarLoc>,
std::allocator<std::pair<(anonymous namespace)::LiveDebugValues::VarLoc const,
unsigned int> > >::_M_lower_bound(std::_Rb_tree_node<std::pair<(anonymous
namespace)::LiveDebugValues::VarLoc const, unsigned int> >*,
std::_Rb_tree_node_base*, (anonymous namespace)::LiveDebugValues::VarLoc
const&) (stl_tree.h:1624)
==2065== by 0x253031C: std::_Rb_tree<(anonymous
namespace)::LiveDebugValues::VarLoc, std::pair<(anonymous
namespace)::LiveDebugValues::VarLoc const, unsigned int>,
std::_Select1st<std::pair<(anonymous namespace)::LiveDebugValues::VarLoc const,
unsigned int> >, std::less<(anonymous namespace)::LiveDebugValues::VarLoc>,
std::allocator<std::pair<(anonymous namespace)::LiveDebugValues::VarLoc const,
unsigned int> > >::lower_bound((anonymous namespace)::LiveDebugValues::VarLoc
const&) (stl_tree.h:1098)
==2065== by 0x252FDD4: std::map<(anonymous
namespace)::LiveDebugValues::VarLoc, unsigned int, std::less<(anonymous
namespace)::LiveDebugValues::VarLoc>, std::allocator<std::pair<(anonymous
namespace)::LiveDebugValues::VarLoc const, unsigned int> >
<span class="quote">>::lower_bound((anonymous namespace)::LiveDebugValues::VarLoc const&)</span >
(stl_map.h:1150)
==2065== by 0x252FA9B: std::map<(anonymous
namespace)::LiveDebugValues::VarLoc, unsigned int, std::less<(anonymous
namespace)::LiveDebugValues::VarLoc>, std::allocator<std::pair<(anonymous
namespace)::LiveDebugValues::VarLoc const, unsigned int> >
<span class="quote">>::operator[]((anonymous namespace)::LiveDebugValues::VarLoc const&)</span >
(stl_map.h:479)
==2065== by 0x252F8A4: llvm::UniqueVector<(anonymous
namespace)::LiveDebugValues::VarLoc>::insert((anonymous
namespace)::LiveDebugValues::VarLoc const&) (UniqueVector.h:44)
==2065== by 0x252E25E: (anonymous
namespace)::LiveDebugValues::transferDebugValue(llvm::MachineInstr const&,
(anonymous namespace)::LiveDebugValues::OpenRangesSet&,
llvm::UniqueVector<(anonymous namespace)::LiveDebugValues::VarLoc>&)
(LiveDebugValues.cpp:298)
==2065== by 0x252E83D: (anonymous
namespace)::LiveDebugValues::transfer(llvm::MachineInstr&, (anonymous
namespace)::LiveDebugValues::OpenRangesSet&,
llvm::SmallDenseMap<llvm::MachineBasicBlock const*,
llvm::SparseBitVector<128u>, 4u, llvm::DenseMapInfo<llvm::MachineBasicBlock
const*>, llvm::detail::DenseMapPair<llvm::MachineBasicBlock const*,
llvm::SparseBitVector<128u> > >&, llvm::UniqueVector<(anonymous
namespace)::LiveDebugValues::VarLoc>&) (LiveDebugValues.cpp:361)
==2065== by 0x252F0DD: (anonymous
namespace)::LiveDebugValues::ExtendRanges(llvm::MachineFunction&)
(LiveDebugValues.cpp:449)
==2065== by 0x252F7E4: (anonymous
namespace)::LiveDebugValues::runOnMachineFunction(llvm::MachineFunction&)
(LiveDebugValues.cpp:513)
==2065== by 0x25A595D:
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(MachineFunctionPass.cpp:60)
==2065== by 0x28EE590: llvm::FPPassManager::runOnFunction(llvm::Function&)
(LegacyPassManager.cpp:1526)
==2065== by 0x28EE707: llvm::FPPassManager::runOnModule(llvm::Module&)
(LegacyPassManager.cpp:1547)
==2065==
$ ~/llvm/results/bin/clang -v
clang version 4.0.0 (trunk 276092) (llvm/trunk 276091)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/dcb/llvm/results/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.1.1
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/6.1.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
[dcb@dhcppc1 SRC]$</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>