diff --git a/core/metacling/src/TClingTypeInfo.cxx b/core/metacling/src/TClingTypeInfo.cxx index f5cf1c321ef64..a8363534c73e6 100644 --- a/core/metacling/src/TClingTypeInfo.cxx +++ b/core/metacling/src/TClingTypeInfo.cxx @@ -108,6 +108,8 @@ const char *TClingTypeInfo::Name() const TTHREAD_TLS_DECL( std::string, buf); buf.clear(); + // TODO: This needs to be locked, but the lock cannot be placed in TClingUtils.cxx as it cannot depend from + // TInterpreter.h for the declaration of gInterpreterMutex. Or can it? R__LOCKGUARD(gInterpreterMutex); ROOT::TMetaUtils::GetFullyQualifiedTypeName(buf,fQualType,*fInterp); return buf.c_str(); // NOLINT @@ -242,6 +244,9 @@ const char *TClingTypeInfo::TrueName(const ROOT::TMetaUtils::TNormalizedCtxt &no TTHREAD_TLS_DECL( std::string, buf); buf.clear(); + // TODO: This needs to be locked, but the lock cannot be placed in TClingUtils.cxx as it cannot depend from + // TInterpreter.h for the declaration of gInterpreterMutex. Or can it? + R__LOCKGUARD(gInterpreterMutex); ROOT::TMetaUtils::GetNormalizedName(buf,fQualType, *fInterp, normCtxt); return buf.c_str(); // NOLINT @@ -257,6 +262,10 @@ std::string TClingTypeInfo::NormalizedName(const ROOT::TMetaUtils::TNormalizedCt return ""; } std::string buf; + + // TODO: This needs to be locked, but the lock cannot be placed in TClingUtils.cxx as it cannot depend from + // TInterpreter.h for the declaration of gInterpreterMutex. Or can it? + R__LOCKGUARD(gInterpreterMutex); ROOT::TMetaUtils::GetNormalizedName(buf,fQualType, *fInterp, normCtxt); // in C++11 this will be efficient thanks to the move constructor.