root icon indicating copy to clipboard operation
root copied to clipboard

Valgrind reports issues with ROOT release builds

Open vgvassilev opened this issue 1 year ago • 0 comments

==22765== Memcheck, a memory error detector
==22765== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==22765== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==22765== Command: root.exe -e #define\ ClingWorkAroundPrintfIssues -e #define\ ClingWorkAroundLackOfModule -e #define\ ClingWorkAroundProxyConfusion -e #define\ ClingWorkAroundMissingDynamicScope -e #define\ ClingWorkAroundMultipleInclude -e #define\ ClingWorkAroundAutoParseUsingNamespace -e #define\ ClingWorkAroundExtraParensWithImplicitAuto -e #define\ ClingWorkAroundNoPrivateClassIO -e #define\ ClingWorkAroundBrokenUnnamedReturn -e #define\ ClingWorkAroundUnnamedDetection2 -e #define\ ClingWorkAroundUnnamedInclude -e #define\ ClingWorkAroundJITfullSymbolResolution -e #define\ ClingWorkAroundNoDotNamespace -e #define\ ClingWorkAroundNoDotInclude -e #define\ ClingWorkAroundTClassUpdateDouble32 -e #define\ ClingWorkAroundUnloadingVTABLES -q -l -b assertSparseSelection.C
==22765== 

Processing assertSparseSelection.C...
==22765== Conditional jump or move depends on uninitialised value(s)
==22765==    at 0x9D9A01A: llvm::ConstantExpr::getGetElementPtr(llvm::Type*, llvm::Constant*, llvm::ArrayRef<llvm::Value*>, bool, llvm::Optional<unsigned int>, llvm::Type*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x93F2CBA: (anonymous namespace)::SymbolicallyEvaluateGEP(llvm::GEPOperator const*, llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&, llvm::TargetLibraryInfo const*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x93F35A1: (anonymous namespace)::ConstantFoldInstOperandsImpl(llvm::Value const*, unsigned int, llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const&, llvm::TargetLibraryInfo const*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x93F15DF: (anonymous namespace)::ConstantFoldConstantImpl(llvm::Constant const*, llvm::DataLayout const&, llvm::TargetLibraryInfo const*, llvm::SmallDenseMap<llvm::Constant*, llvm::Constant*, 4u, llvm::DenseMapInfo<llvm::Constant*>, llvm::detail::DenseMapPair<llvm::Constant*, llvm::Constant*> >&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x93F38B7: llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const&, llvm::TargetLibraryInfo const*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x91305C5: AddReachableCodeToWorklist(llvm::BasicBlock*, llvm::DataLayout const&, llvm::SmallPtrSetImpl<llvm::BasicBlock*>&, llvm::InstCombineWorklist&, llvm::TargetLibraryInfo const*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x9139861: combineInstructionsOverFunction(llvm::Function&, llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::ProfileSummaryInfo*, bool, llvm::LoopInfo*) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x913A00E: llvm::InstructionCombiningPass::runOnFunction(llvm::Function&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x9E4CCC7: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x9E4CE00: llvm::FPPassManager::runOnModule(llvm::Module&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x9E4BEE5: llvm::legacy::PassManagerImpl::run(llvm::Module&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x6F12B5A: cling::IncrementalExecutor::runStaticInitializersOnce(cling::Transaction&) (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765== 
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x31242000) (defined)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x31242000) (noaccess)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x31242000) (defined)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x31242000) (noaccess)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x2d27d000) (defined)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x2d27d000) (noaccess)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x2d27d000) (defined)
==22765== Warning: set address range perms: large range [0x1cfd0000, 0x2d27d000) (noaccess)
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (noaccess)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (noaccess)
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (noaccess)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (noaccess)
IncrementalExecutor::executeFunction: symbol '_ZNK5cling5Value5getAsIP4TH1FEET_v' unresolved while linking function '_GLOBAL__sub_I_cling_module_25'!
You are probably missing the definition of TH1F* cling::Value::getAs<TH1F*>() const
Maybe you need to load the corresponding shared library?
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x33aaa000) (noaccess)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (defined)
==22765== Warning: set address range perms: large range [0x1f838000, 0x2fae5000) (noaccess)
terminate called after throwing an instance of 'cling::InvalidDerefException'
  what():  Trying to dereference null pointer or trying to call routine taking non-null arguments
==22765== 
==22765== Process terminating with default action of signal 6 (SIGABRT)
==22765==    at 0x546E18B: raise (raise.c:51)
==22765==    by 0x544D92D: abort (abort.c:100)
==22765==    by 0x4E9E0A8: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29)
==22765==    by 0x4EA9505: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29)
==22765==    by 0x4EA9570: std::terminate() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29)
==22765==    by 0x4EA97F4: __cxa_throw (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.29)
==22765==    by 0x6C99676: cling_runtime_internal_throwIfInvalidPointer.cold (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x4DFF3CC: ???
==22765==    by 0x1FFEFFBB3F: ???
==22765==    by 0xB60A6A5548AF56FF: ???
==22765==    by 0x6E83C9F: ??? (in /build/vvassilev/root-release-master/lib/libCling.so)
==22765==    by 0x4DEB03F: ???
==22765== 
==22765== HEAP SUMMARY:
==22765==     in use at exit: 66,909,576 bytes in 172,570 blocks
==22765==   total heap usage: 645,966 allocs, 473,396 frees, 231,012,668 bytes allocated
==22765== 
==22765== LEAK SUMMARY:
==22765==    definitely lost: 0 bytes in 0 blocks
==22765==    indirectly lost: 0 bytes in 0 blocks
==22765==      possibly lost: 7,728 bytes in 66 blocks
==22765==    still reachable: 66,622,884 bytes in 169,043 blocks
==22765==                       of which reachable via heuristic:
==22765==                         stdstring          : 111 bytes in 1 blocks
==22765==                         multipleinheritance: 7,776 bytes in 10 blocks
==22765==         suppressed: 278,964 bytes in 3,461 blocks
==22765== Rerun with --leak-check=full to see details of leaked memory
==22765== 
==22765== Use --track-origins=yes to see where uninitialised values come from
==22765== For lists of detected and suppressed errors, rerun with: -s
==22765== ERROR SUMMARY: 237 errors from 1 contexts (suppressed: 185 from 20)
Aborted (core dumped)

That seems an important issue to fix. We should also probably run valgrind on all the tests to get a feeling of where we stand. And, yes I know it can take days or weeks but I think it is worth it.

vgvassilev avatar Sep 19 '22 06:09 vgvassilev