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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
If we preload modules using cling::Interpreter::loadModule the
deserializations of the module initializers (such as global variables).
We want the behavior of clang::Sema::ActOnModuleImport, however, it requires
valid source locations.
This patch ignores the ImportDecls which presumably came from loadModule.
Original commit message:
"Over the years we have a pathological issue with cling when it calls directly
compiler API. Most of the API assume they are called from code residing in a
text file. This code has valid source locations which can be used for
comparisons and things like point of instantiation for template instantiations.
This means that whenever a clang API requires a valid source location, cling
should have an interface which gives a pseudo-valid, commonly-rooted unique
source location.
We are bitten by this fact when preloading modules as if we have diagnostics
they cannot be ordered due to the fact that the compared decls from two
different modules do not have a common includer.
This patch avoids using an API and relies on a textual form which does not have
this problem at the cost of synthesizing an extra string."
Over the years we have a pathological issue with cling when it calls directly
compiler API. Most of the API assume they are called from code residing in a
text file. This code has valid source locations which can be used for
comparisons and things like point of instantiation for template instantiations.
This means that whenever a clang API requires a valid source location, cling
should have an interface which gives a pseudo-valid, commonly-rooted unique
source location.
We are bitten by this fact when preloading modules as if we have diagnostics
they cannot be ordered due to the fact that the compared decls from two
different modules do not have a common includer.
This patch avoids using an API and relies on a textual form which does not have
this problem at the cost of synthesizing an extra string.
If the ValuePrinter runtime header gets included,
a transaction might be emitted, and the transaction
containing the function body cannot be found anymore.
This causes roottest/root/meta/getFuncBody.C to fail
with runtime modules.
Assuming that page_size is a power of 2, the calculation of the
base address of the page can be simplified and avoid a division.
According to POSIX, either MS_SYNC or MS_ASYNC must be specified
when calling msync(). Failure to include one of these flags will
cause msync() to fail on some systems.
When msync() returns -1, the pointer is only considered invalid
when errno is set to ENOMEM. In principle, the other possible
values for errno won't happen, but if they do, that should be
considered an error, hence the assert condition needed an update.
EBUSY shouldn't happen since we do not add MS_INVALIDATE to flags,
and EINVAL shouldn't happen because we always pass a multiple of
the page size to msync(). EFAULT is only used in Linux 2.4.18 and
earlier instead of ENOMEM.
libc++ comes with a builtin modulemap and is using "std" as the
module name for the STL. To stay consistent we should use the same
name (and "std" is anyway a better name).
We have user library search paths which come from LD_LIBRARY_PATH or similar;
and system library search paths which are coming from the platform.
This patch enables external users performing symbol resolution to filter out
system search paths when they know the symbol cannot be there.
Now, TClingCallbacks can merge the modules vs non-modules code paths, where
the modules prebuilt path is essentially our LD_LIBRARY_PATH.
If the constructor of the contained object is not run (e.g. because
assembling its arguments triggered an exception), the dtor must not
be run when destructing the cling::Value. Detect this case by imprinting
canary bytes into the contained object bytes: if they have changed,
run the dtor, if not assume that the constructor has failed.
This will cause false positives in those cases where the constructor
is not modifying the first object bytes: in these cases, the dtor
is not run even though the ctor is run. That is still better than
the other case (where the dtor crashes because no ctor was run).
ACLiC now synthesizes a modulemap with a suffix _ACLiC_dict.modulemap. The file
contains the source file to be compiled and the corresponding library.
The modulemap is then passed to rootcling via -fmodule-map-file= flag to avoid
naming clashes with possibly existing other modulemap files.
This patch teaches cling to work with the -fmodule-map-file= flag.
ACLiC supports automatic inclusion of Rtypes.h (making ClassDef macro
available). Modules are built in isolation and are resilient to #include
of Rtypes.h at rootcling startup time. We make module Core (containing Rtypes.h)
visible via a newly implemented callback.
The transactions are useful to buffer Decls before sending them to CodeGen,
to verify semantic validity before emitting. If there is no codegen,
DeclCollecting them wastes CPU cycles during PCH generation time
because all headers are in one single transaction. Of course this also
speeds up regular rootcling invocations.
This patch moves the ROOT-specific rdict.pcm optimization in the EXTENSION_BLOCK
of a C++ module file.
This reduces the generated artifacts and simplifies the loading of a rdict pcm
file as it is now part of the C++ module file. This patch paves our way to
using the global module indexing.
This should solve the problem we have been seeing with cmsUnload. The problem stems from the fact that TCling::AutoParseImplRecurse
uses the address of the current transactions has an index/key when registering a class in fTransactionHeadersMap.
On some platforms TInterpreter.h is parsed late, i.e. during the compilation of:
gInterpreter->AutoParse("SiStripCluster");
consequently (as AutoParse does not create its own transaction), the transactions that contains
the parsin of TInterpreter is the last one committed before AutoParseImplRecurse is executed.
Without the parsing of TInterpreter.h then that transaction is return by fInterpreter->getCurrentTransaction().
With the parsing of TInterpreter.h, during the commit of the transaction of the callbacks are triggered
and one of the decl is a constant (kFALSE) and thus, in TCling::HandleNewDecl, provokes the execution of
if (gROOT->GetListOfGlobals()->FindObject(ND->getNameAsString().c_str()))
return;
which will triggered the creation of a Transaction, however since the last top level transaction was
just switch to the state 'Committed', the new transaction will not be nested and thus
IncrementalParser::endTransaction will set the current transaction to 'nullptr'.
And this value of nullptr for the key of fTransactionHeadersMap is neither guaranteed to be unique
nor handled properly by the rest of the code.
It is unclear why this problem have surfaced recently.
On a failing machine, rebuilding with a 2 month old commit (ad9e5c42cb) still exhibits the problem.
The implementation of class->library mapping makes a call to the
LookupHelper::findScope. This makes the recursive invocations to
LookupHelper::findScope -> ... -> LookupHelper::findScope happen more often.
Dropbox folders (among others) can contain parentheses.
Without this patch, ROOT and cling misinterpret those directories as arguments.
Instead, first find the end of the ".x" line.
If the previous token was a closing paren, we assume that the preceding
tokens (up to the non-nested opening paren) belong to the argument.