[llvm-dev] uninitialized values in Attributes.cpp

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 20 19:18:15 PST 2016


----- Original Message -----
> From: "regehr" <regehr at cs.utah.edu>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "llvm-dev" <llvm-dev at lists.llvm.org>, "Mehdi Amini" <mehdi.amini at apple.com>
> Sent: Sunday, November 20, 2016 7:56:59 PM
> Subject: Re: [llvm-dev] uninitialized values in Attributes.cpp
> 
> > We should first confirm that there is actually a problem. At least
> > on some platforms (e.g. PowerPC), valgrind's ability to accurately
> > track uses of undefined data is limited.
> 
> Sure, I'm happy to do legwork here but not sure how to proceed.
> 
> I'll add that I still have a number (~300) of valgrind-related
> problems
> that show up for an LLVM built using Clang, but not for one built
> using
> GCC.  A typical one is below.  We should definitely get to the bottom
> of
> these.

Interesting. This is how life has been for me on PowerPC for a while now - the problem being that LLVM's PowerPC backend makes more fine-grained use of the condition-register bits than GCC, and valgrind does not track the individual bits with sufficient granularity to prevent false positives (see https://bugs.kde.org/show_bug.cgi?id=330617). Perhaps we now have more such situations on other platforms. You're running on x86_64, correct?

 -Hal

> 
> John
> 
> 
> 
> 
> FAIL: LLVM :: CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll (4514 of
> 18737)
> ******************** TEST 'LLVM ::
> CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll' FAILED
> ********************
> Script:
> --
> /home/regehr/llvm/build-llvmtrunk-vgtest/./bin/llc -arm-global-merge
> -global-merge-group-by-use=false -filetype=obj <
> /home/regehr/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll |
> /home/regehr/llvm/build-llvmtrunk-vgtest/./bin/llvm-dwarfdump
> -debug-dump=info - |
> /home/regehr/llvm/build-llvmtrunk-vgtest/./bin/FileCheck
> /home/regehr/llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll
> --
> Exit Code: 123
> 
> Command Output (stderr):
> --
> ==10217== Conditional jump or move depends on uninitialised value(s)
> ==10217==    at 0x10BE9A0:
> llvm::DwarfCompileUnit::addRange(llvm::RangeSpan)
> (DwarfCompileUnit.cpp:212)
> ==10217==    by 0x1078EBA:
> llvm::DwarfDebug::endFunction(llvm::MachineFunction const*)
> (DwarfDebug.cpp:1132)
> ==10217==    by 0x106221C: llvm::AsmPrinter::EmitFunctionBody()
> (AsmPrinter.cpp:982)
> ==10217==    by 0x87CA02:
> llvm::ARMAsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
> (ARMAsmPrinter.cpp:165)
> ==10217==    by 0x1184F35:
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
> (MachineFunctionPass.cpp:62)
> ==10217==    by 0x13EBF7E:
> llvm::FPPassManager::runOnFunction(llvm::Function&)
> (LegacyPassManager.cpp:1513)
> ==10217==    by 0x13EC1D2:
> llvm::FPPassManager::runOnModule(llvm::Module&)
> (LegacyPassManager.cpp:1534)
> ==10217==    by 0x13EC6D5: runOnModule (LegacyPassManager.cpp:1590)
> ==10217==    by 0x13EC6D5:
> llvm::legacy::PassManagerImpl::run(llvm::Module&)
> (LegacyPassManager.cpp:1693)
> ==10217==    by 0x64914C: compileModule(char**, llvm::LLVMContext&)
> (llc.cpp:524)
> ==10217==    by 0x6467EA: main (llc.cpp:282)
> ==10217==
> 
> --
> 
> 

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-dev mailing list