Skip to content
Merged
Prev Previous commit
Next Next commit
Test
  • Loading branch information
EgorBo committed Dec 3, 2022
commit ef294a94dd600423476b98a30194918a4d15c39d
2 changes: 1 addition & 1 deletion src/coreclr/inc/CrstTypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -579,5 +579,5 @@ Crst PgoData
End

Crst StaticBoxInit
AcquiredBefore LoaderHeap FrozenObjectHeap
AcquiredBefore LoaderHeap FrozenObjectHeap AssemblyLoader
End
2 changes: 1 addition & 1 deletion src/coreclr/inc/crsttypes_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ int g_rgCrstLevelMap[] =
5, // CrstSingleUseLock
0, // CrstSpecialStatics
0, // CrstStackSampler
4, // CrstStaticBoxInit
13, // CrstStaticBoxInit
-1, // CrstStressLog
5, // CrstStubCache
0, // CrstStubDispatchCache
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/methodtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,6 @@ void MethodTable::AllocateRegularStaticBox(FieldDesc* pField, BYTE* fieldAddress
// Grab field's type handle before we enter lock
MethodTable* pFieldMT = pField->GetFieldTypeHandleThrowing().GetMethodTable();
bool hasFixedAddr = HasFixedAddressVTStatics();
pFieldMT->EnsureInstanceActive();

// Taking a lock since we might come here from multiple threads/places
CrstHolder crst(GetAppDomain()->GetStaticBoxInitLock());
Expand Down