From 25fcf69c0662b09fbd9dc1c0446b7679ae020ed5 Mon Sep 17 00:00:00 2001 From: Vincenzo Eduardo Padulano Date: Sat, 8 Oct 2022 03:12:06 +0200 Subject: [PATCH] [core] Guard gInterpreterMutex in TClingClassInfo::IsEnum Fixes https://github.com/root-project/root/issues/11515 This method leads to contention in some specific scenarios (see linked issue). Co-authored-by: Philippe Canal --- core/metacling/src/TClingClassInfo.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/metacling/src/TClingClassInfo.cxx b/core/metacling/src/TClingClassInfo.cxx index c0c061dfcafed..ce6e82d388156 100644 --- a/core/metacling/src/TClingClassInfo.cxx +++ b/core/metacling/src/TClingClassInfo.cxx @@ -815,6 +815,7 @@ bool TClingClassInfo::IsBase(const char *name) const bool TClingClassInfo::IsEnum(cling::Interpreter *interp, const char *name) { + R__LOCKGUARD(gInterpreterMutex); // Note: This is a static member function. TClingClassInfo info(interp, name); if (info.IsValid() && (info.Property() & kIsEnum)) {