Skip to content

GetMethodWithPrototype return the incorrect function ? #7955

@pcanal

Description

@pcanal

As seen by CMS on cms-sw/cmssw#33466

The following piece of lookup:

{
auto cls = TClass::GetClass("std::vector<int>");
auto meth = cls->GetMethodWithPrototype("operator[]","int",true,ROOT::kConversionMatch);
auto args = meth->GetListOfMethodArgs();
auto methArg = dynamic_cast<TMethodArg*>(args->First());
cout << args->GetEntries() << endl;
cout << methArg->GetTypeName() << endl;
}

print

1
vector<TClass*>::size_type

where one would expect

1
vector<int>::size_type

This has catastrophic consequence when combined with autoloading of library.

In the user's case the search is about std::vector<reco::RecoTauPiZero> but the argument found is vector<ROOT::Experimental::REveTableEntry>::size_type which ends up with a batch job trying to load libREve and thus libGui and thus requiring the reading of $HOME/.root.mimes which fails badly if $HOME is not set (case of somce condor jobs) which issues a Fatal error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions