When server GC is on, the DomainAssembly::EnumStaticGCRefs is called to
enumerate GC statics. For collectible assemblies, the GC statics are
stored in managed arrays and so there is no need for a special
enumeration of the GC statics. Attempt to do that was causing a crash
due to the fact that the corresponding DomainLocalModule::m_pGCStatics
is always NULL for collectible assemblies and we were trying to access
it.
GCHeapUtilities::IsServerHeap() &&
IsGCSpecialThread());
+ if (IsCollectible())
+ {
+ // Collectible assemblies have statics stored in managed arrays, so they don't need special handlings
+ return;
+ }
+
DomainModuleIterator i = IterateModules(kModIterIncludeLoaded);
while (i.Next())
{