Hi,
I would like to migrate from v5-34-15 (compiled with g++) to v6 beta 2 (compiled with g++) but I can’t for the moment because of the enormous number of valgrind warnings related with llvm/clang/cling
//test.cc
#include "TFile.h"
int main(int argc,char *argv[]) {
TFile file("test.root","UPDATE") ;
file.Write() ;
file.Close() ;
return 0 ;
}
compiled with :
gcc -o test `root-config --cflags --libs` test.cc
valgrind test 2> valgrind.out.txt
I have put the complete valgrind.out.txt in attachment :
==7420== Memcheck, a memory error detector
==7420== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==7420== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info
==7420== Command: ./test2
==7420==
==7420== Conditional jump or move depends on uninitialised value(s)
==7420== at 0x102953F0: clang::ASTDeclReader::VisitFriendDecl(clang::FriendDecl*) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x1029EE64: clang::ASTDeclReader::Visit(clang::Decl*) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x1029F211: clang::ASTReader::ReadDeclRecord(unsigned int) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x10259C76: clang::ASTReader::GetDecl(unsigned int) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x10259FD3: (anonymous namespace)::FindExternalLexicalDeclsVisitor::visit(clang::serialization::ModuleFile&, bool, void*) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x10306CE3: clang::serialization::ModuleManager::visitDepthFirst(bool (*)(clang::serialization::ModuleFile&, bool, void*), void*) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x10252052: clang::ASTReader::FindExternalLexicalDecls(clang::DeclContext const*, bool (*)(clang::Decl::Kind), llvm::SmallVectorImpl<clang::Decl*>&) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x10908850: clang::DeclContext::LoadLexicalDeclsFromExternalStorage() const (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x1090894E: clang::DeclContext::decls_begin() const (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x108ECB8D: (anonymous namespace)::FinalOverriderCollector::Collect(clang::CXXRecordDecl const*, bool, clang::CXXRecordDecl const*, clang::CXXFinalOverriderMap&) (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x108F0AB1: clang::CXXRecordDecl::getFinalOverriders(clang::CXXFinalOverriderMap&) const (in /home/kulam/local/lib/root/libCling.so)
==7420== by 0x109CFC52: (anonymous namespace)::FinalOverriders::FinalOverriders(clang::CXXRecordDecl const*, clang::CharUnits, clang::CXXRecordDecl const*) (in /home/kulam/local/lib/root/libCling.so)
==7420==
==7420==
==7420== HEAP SUMMARY:
==7420== in use at exit: 35,531,154 bytes in 47,181 blocks
==7420== total heap usage: 190,044 allocs, 142,863 frees, 170,545,124 bytes allocated
************************************
==7420==
==7420== LEAK SUMMARY:
==7420== definitely lost: 920 bytes in 1 blocks
==7420== indirectly lost: 80 bytes in 3 blocks
==7420== possibly lost: 233,889 bytes in 1,989 blocks
==7420== still reachable: 35,291,325 bytes in 45,110 blocks
==7420== suppressed: 4,940 bytes in 78 blocks
==7420== Reachable blocks (those to which a pointer was found) are not shown.
==7420== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==7420==
==7420== For counts of detected and suppressed errors, rerun with: -v
==7420== Use --track-origins=yes to see where uninitialised values come from
==7420== ERROR SUMMARY: 472 errors from 449 contexts (suppressed: 25 from 19)
And of course, I do the same with v5-34-15, there is no problem :
==11167== Memcheck, a memory error detector
==11167== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==11167== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info
==11167== Command: ./test2
==11167==
==11167==
==11167== HEAP SUMMARY:
==11167== in use at exit: 2,734,372 bytes in 32,494 blocks
==11167== total heap usage: 67,183 allocs, 34,689 frees, 5,037,685 bytes allocated
==11167==
==11167== LEAK SUMMARY:
==11167== definitely lost: 0 bytes in 0 blocks
==11167== indirectly lost: 0 bytes in 0 blocks
==11167== possibly lost: 0 bytes in 0 blocks
==11167== still reachable: 2,111,959 bytes in 27,268 blocks
==11167== suppressed: 622,413 bytes in 5,226 blocks
==11167== Reachable blocks (those to which a pointer was found) are not shown.
==11167== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==11167==
==11167== For counts of detected and suppressed errors, rerun with: -v
==11167== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 13 from 7)
My valgrind suppression files are :
./etc/valgrind-root.supp
./etc/valgrind-root-python.supp
./interpreter/llvm/src/utils/valgrind/x86_64-pc-linux-gnu.supp
./interpreter/llvm/src/tools/clang/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp
My system is :
Linux 3.10.17 #1 SMP Sat Nov 2 11:20:07 EDT 2013 x86_64 GNU/Linux
x86_64 Debian Wheezy
gcc (Debian 4.7.2-5) 4.7.2
Thanks for your help…
valgrind.out.txt (890 KB)