[llvm-bugs] [Bug 28631] New: Possible valgrind error in LiveDebugValues

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 20 13:30:16 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28631

            Bug ID: 28631
           Summary: Possible valgrind error in LiveDebugValues
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dcb314 at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16775
  --> https://llvm.org/bugs/attachment.cgi?id=16775&action=edit
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> >
>::lower_bound((anonymous namespace)::LiveDebugValues::VarLoc const&)
(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> >
>::operator[]((anonymous namespace)::LiveDebugValues::VarLoc const&)
(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 at dhcppc1 SRC]$

-- 
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/20160720/dcb8e21a/attachment.html>


More information about the llvm-bugs mailing list