diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index a000aee2ab4..3422faf2730 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -195,6 +195,7 @@ AttrListPtr::AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) { } const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) { + sys::SmartScopedLock Lock(*ALMutex); if (AttrList == RHS.AttrList) return *this; if (AttrList) AttrList->DropRef(); AttrList = RHS.AttrList;