Skip to content

Commit

Permalink
[core] Lock interpreter in TCling::GetClassSharedLibs
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Hahnfeld <[email protected]>
  • Loading branch information
vepadulano and hahnjo committed Jul 28, 2023
1 parent 5035282 commit 8bd5db8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7025,6 +7025,11 @@ static std::string GetClassSharedLibsForModule(const char *cls, cling::LookupHel
const char* TCling::GetClassSharedLibs(const char* cls)
{
if (fCxxModulesEnabled) {
// Lock the interpreter mutex before interacting with cling.
// TODO: Can we move this further deep? In principle the lock should be in
// GetClassSharedLibsForModule, but it might be needed also for
// getLookupHelper?
R__LOCKGUARD(gInterpreterMutex);
llvm::StringRef className = cls;
// If we get a class name containing lambda, we cannot parse it and we
// can exit early.
Expand Down

0 comments on commit 8bd5db8

Please sign in to comment.