Andrew Kelley via llvm-dev
2016-Dec-26 22:53 UTC
[llvm-dev] bug in the LiveDebugValues code?
Here is LLVM IR code: https://gist.github.com/andrewrk/041af662b3ff515cd0be64ab85c112d7 That produces the following valgrind message: $ valgrind llc -filetype=obj bug.ll ==27195== Conditional jump or move depends on uninitialised value(s) ==27195== at 0x56A0917: (anonymous namespace)::LiveDebugValues::transferDebugValue(llvm::MachineInstr const&, (anonymous namespace)::LiveDebugValues::OpenRangesSet&, llvm::UniqueVector<(anonymous namespace)::LiveDebugValues::VarLoc>&) [clone .isra.207] (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x56A3EE5: (anonymous namespace)::LiveDebugValues::ExtendRanges(llvm::MachineFunction&) [clone .constprop.259] (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x57214A0: llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x55CDF01: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x55CE29A: llvm::FPPassManager::runOnModule(llvm::Module&) (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x55CDB4E: llvm::legacy::PassManagerImpl::run(llvm::Module&) (in /nix/store/06dpmfn74zrmman8nq8p96dg50lwbxhg-llvm-3.9.0-lib/lib/ libLLVM-3.9.so) ==27195== by 0x41C0B7: compileModule(char**, llvm::LLVMContext&) [clone .constprop.385] (in /nix/store/jis8r9v01xz357h3b39sqym8rls3h6nj-llvm-3.9.0/bin/llc) ==27195== by 0x412D3F: main (in /nix/store/jis8r9v01xz357h3b39sqym8rls3h6nj-llvm-3.9.0/bin/llc) This is in llvm 3.9.0. I found this while troubleshooting what I now to believe to be a separate issue in my frontend code that caused LLVM to go into an infinite loop writing into a .o file. When I ran that IR code against llc, I got "error: initializer with struct type has wrong # elements" which LLVMVerifyModule did not catch. I can provide this example IR as well if wanted. Regards, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161226/f1aab2e0/attachment.html>