Skip to content

Commit

Permalink
Merge pull request root-project#81 from davidlt/add-asan-reports
Browse files Browse the repository at this point in the history
Resolve ASan reports (user-after-free) in TClass and TCling
  • Loading branch information
davidlt committed May 27, 2015
2 parents 389d8f2 + e3dd6c7 commit 4443527
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/meta/src/TClass.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2835,9 +2835,9 @@ TClass *TClass::GetClass(const char *name, Bool_t load, Bool_t silent)
if (!loadedcl){
if (TDataType* theDataType = gROOT->GetType(normalizedName.c_str())){
// We have a typedef: we get the name of the underlying type
auto underlyingTypeName = theDataType->GetTypeName().Data();
auto underlyingTypeName = theDataType->GetTypeName();
// We see if we can bootstrap a class with it
auto underlyingTypeDict = TClassTable::GetDictNorm(underlyingTypeName);
auto underlyingTypeDict = TClassTable::GetDictNorm(underlyingTypeName.Data());
if (underlyingTypeDict){
loadedcl = underlyingTypeDict();
}
Expand Down
4 changes: 2 additions & 2 deletions core/meta/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5283,8 +5283,8 @@ void TCling::UpdateClassInfoWithDecl(const void* vTD)
}
clang::QualType type( td->getTypeForDecl(), 0 );

auto declName=ND->getNameAsString().c_str();
if (!TClass::HasNoInfoOrEmuOrFwdDeclaredDecl(declName)){
auto declName = ND->getNameAsString();
if (!TClass::HasNoInfoOrEmuOrFwdDeclaredDecl(declName.c_str())){
// printf ("Impossible to find a TClassEntry in kNoInfo or kEmulated the decl of which would be called %s. Skip w/o building the normalized name.\n",declName );
return;
}
Expand Down

0 comments on commit 4443527

Please sign in to comment.