From 36c9b606bda36e8409fdc1d310eee1f24d8da082 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 10 Oct 2014 10:43:51 -0500 Subject: [PATCH] Must take cint lock before calling TCint::CallFunc_Factory Helgrind found that TCint::CallFunc_Factory indirectly updates global cint state. Therefore one must take the cint lock before calling the function. This was the only place (other than TSelectorCint::Build) which calls this function without first taking the lock. --- core/meta/src/TMethodCall.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/meta/src/TMethodCall.cxx b/core/meta/src/TMethodCall.cxx index 5b3d4924a5398..63dceedb8de5a 100644 --- a/core/meta/src/TMethodCall.cxx +++ b/core/meta/src/TMethodCall.cxx @@ -215,9 +215,10 @@ void TMethodCall::InitImplementation(const char *methodname, const char *params, // 'methodname' should NOT have any scope information in it. The scope // information should be passed via the TClass or CINT ClassInfo. - if (!fFunc) + if (!fFunc) { + R__LOCKGUARD2(gCINTMutex); fFunc = gCint->CallFunc_Factory(); - else + } else gCint->CallFunc_Init(fFunc); fClass = cl;