IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Original problem:
set atlas shell environment
root.exe
TFile *_file0 = TFile::Open("atlasfile.root");
bunch of Warning about missing dictionary
c = TClass::GetClass("GaudiCommon<Algorithm>")
Error in <TProtoClass::FindDataMember>: data member with index 0 is not found in class GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<s
tring>,allocator<SmartIF<IService> > > >
Error in <CreateRealData>: Cannot find data member # 0 of class GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<string>,allocator<SmartI
F<IService> > > > for parent GaudiCommon<Algorithm>!
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0x9d46d70
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0x9d47cb0
...
Tweak of the problem:
c = TClass::GetClass("GaudiCommon<Algorithm>");
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0x300ce10
OBJ: TRealData m_services. Description of persistent data members : 0 at: 0x300e9c0
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0x300eaa0
...
Note: no error or warning but the ListOfRealData is 'wrong'.
Correct behavior:
TClass::GetClass("SmartIF<IService>");
TFile *_file0 = TFile::Open("atlasfile.root");
TClass::GetClass("GaudiUtils::Map<string,SmartIF<IService>,__gnu_cxx::hash_map<string,SmartIF<IService>,GaudiUtils::Hash<string>,equal_to<string>,allocator<SmartIF<IService> > > >");
c = TClass::GetClass("GaudiCommon<Algorithm>");
c->GetListOfRealData()->ls();
...
OBJ: TRealData m_services Description of persistent data members : 0 at: 0xc81c820
OBJ: TRealData m_services.m_map Description of persistent data members : 0 at: 0xc81dd00
OBJ: TRealData m_errors Description of persistent data members : 0 at: 0xc81ddb0
...
See autoparse for
unary_function<pair<const string,SmartIF<IService> >,const string>
SmartIF<IService>
Analysis:
1) Opening the file triggering the autoloading of a lots of libraries and the autoparsing of many files.
This includes the declaration of Gaudi::Map but *not* of SmartIF nor SmartIF<IService>.
[Side note: this autoloading is due to DataVector<xAOD::Jet_v1> not having a dictionary]
2) During TClass::GetClass("GaudiCommon<Algorithm>"), the TProtoClass::FillTClass is called and
disable autoloading and autoparsing and then request the GaudiUtils::Map
3) Since there is no dictionary for GaudiUtils::Map, findScope is invoked.
4) During findScope, the instantiation of GaudiUtils::Map fails with an error similar to:
error: field has incomplete type 'SmartIF<IService>'
5) The error handling code path in this case in findScope did *not* revert the transaction
and unload the 'invalid' decl for the GaudiUtils::Map
6) TClingClassInfo assume all decl are valid but finds and use the invalid decl
7) In this case, the invalidity of the decl leads to a lack of data members
8) Thus TProtoClass::FindDataMember complains about the discrepency between the TProtoClass
information and the information from the decl.
Requesting the TClass for the GaudiUtils::Map when autoloading and autoparsing are leads
to the proper instantiation and thus success.
Requesting the TClass for GaudiCommon<Algorithm> before loading the file means that
when the request for the TClass for GaudiUtils::Map is done, the declaration for
GaudiUtils::Map has not yet been parsed and thus findScope use a different error
handling code path (one where the instantiation is not even attempted).
In normal circunstances (all dictionary properly generated and loaded/loadable),
the missing name part in the list of real data member is not fatal (it would be
if it was the case during the initial gathering of information but as it is, all
the necessary information is already in the rootpcm files).
This reverts commit 125a93e0e3562dac5d5a0429ce49a2b625025c26.
It fails in the following case (roottest/root/io/evolution/pragma_read):
dictionary for a/b.h which includes a/c.h as #include "c.h"
This will add a fwd decl with annotation "c.h", but this header cannot
be found. Instead we'd need "a/c.h"...
Now that we can easily revert Transactions' IR (by unloading their
module) we do not need to queue the Decls before emitting them.
This enables EndOfTU actions to be emitted seeminglessly, without
extra transactions, or explicit post-EndOfTU-emission: each
Transaction will have its TU finalized exactly once.
This in turn allows us to turn on Debug emission - which relies on
being invoked exactly once per Module.
Transformers must be invoked before emitting Decls. They are now
invoked for each Decl; WrapperTransformers are invoked when seeing
a wrapper decl. They do not see the "full transaction AST" anymore
- luckily none of our transformers requires this and actually become
simpler because of this change.
This also fixes a bug where the relative sequencing of parsed and
deserialized Decls was lost (parsed was emitted before deserialized).
Remove unused IRTransactions; they should really be llvm::Pass-es.
We don't have them anyway.
Disable a few transformations if the Decl isFromASTFile.
When reverting a Transaction, also revert its nested ones.
In the ValueExtractionSynthesizer, pass the ValuePrinter option as
int, instead of the transaction pointer - that might have changed
(at least its options) by the time we invoke the wrapper.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Explicit paths specified without -i or -o; assuming --only paths...
# rebase in progress; onto b3d9f92
# You are currently splitting a commit while rebasing branch 'declcollector-emits-v2' on 'b3d9f92'.
#
# Changes to be committed:
# modified: interpreter/cling/include/cling/Interpreter/RuntimeUniverse.h
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/AutoSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/CheckEmptyTransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/DeclCollector.cpp
# modified: interpreter/cling/lib/Interpreter/DeclCollector.h
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.cpp
# modified: interpreter/cling/lib/Interpreter/DeclExtractor.h
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.cpp
# modified: interpreter/cling/lib/Interpreter/DynamicLookup.h
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.cpp
# modified: interpreter/cling/lib/Interpreter/IncrementalParser.h
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/NullDerefProtectionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.cpp
# modified: interpreter/cling/lib/Interpreter/TransactionTransformer.h
# modified: interpreter/cling/lib/Interpreter/TransactionUnloader.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValueExtractionSynthesizer.h
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.cpp
# modified: interpreter/cling/lib/Interpreter/ValuePrinterSynthesizer.h
#
# Untracked files:
# .idea/
# 0001-Fix-llvm-merge-issue.patch
# 0002-Fix-warnings.patch
# 0003-Keep-weak-symbols-around-subsequent-transactions-mig.patch
# T.cxx
# T.cxx~
# TMVA.root
# a.out
# boost.root
# config/Makefile.depend~
# core/textinput/src/textinput/TerminalDisplayWin.cpp.orig
# ct.root
# data.root
# interpreter/cling/76fc2055249da7b03148a7d4197a279e9943f012.patch
# interpreter/cling/lib/Interpreter/CIFactory.cpp~
# interpreter/cling/lib/Interpreter/DeclCollector.h~
# interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp~
# modulemap-one-header-per-file.txt
# osrm-routed
# tiles.tar.bz2
# tmva_class_example.root
# tutorials/v3.root
# weights/
#
This prevents:
==4150== Possible data race during write of size 8 at 0xCC136F0 by thread #3
==4150== Locks held: none
==4150== at 0x146EC214: llvm::SmallVectorTemplateBase<cling::IncrementalExecutor::CXAAtExitElement, false>::grow(unsigned long) (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
==4150== by 0x146E9DE3: cling::IncrementalExecutor::AddAtExitFunc(void (*)(void*), void*, cling::Transaction const*) (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
==4150== by 0x160A5044: ???
==4150== by 0x160A67D6: ???
==4150== by 0x160A6783: ???
==4150== by 0x145E76D3: TCling::ExecuteWithArgsAndReturn(TMethod*, void*, void const**, int, void*) const (in /afs/cern.ch/cms/sw/ReleaseCandidates/volB/slc6_amd64_gcc491/lcg/root/6.02.00-lnjiaj2/lib/libCling.so)
Conflicts:
interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp
Use PROJECT_SOURCE_DIR (full path to the root of the project source directory) instead of CMAKE_SOURCE_DIR (the directory from which cmake was started) in order to properly find AsmParser/CMakeLists.txt and call llvm::InitializeNativeTargetAsmParser();
Late parsed templates (Microsoft specific) can leave unswallowed "macro"-like tokens. They will seriously confuse the Parser when entering the next source file. So lex until we are EOF.