Loading...
libkern/c++/OSCollection.cpp xnu-792.22.5 xnu-2050.9.2
--- xnu/xnu-792.22.5/libkern/c++/OSCollection.cpp
+++ xnu/xnu-2050.9.2/libkern/c++/OSCollection.cpp
@@ -60,9 +60,21 @@
 
 void OSCollection::haveUpdated()
 {
-    if ( (gIOKitDebug & kOSLogRegistryMods) && (fOptions & kImmutable) )
-	OSReportWithBacktrace("Trying to change a collection in the registry");
-
+    if (fOptions & kImmutable)
+    {
+#if __LP64__
+	if (!(gIOKitDebug & kOSRegistryModsMode))
+#else
+	if (gIOKitDebug & kOSRegistryModsMode)
+#endif
+	{
+	    panic("Trying to change a collection in the registry");
+	}
+	else
+	{
+	    OSReportWithBacktrace("Trying to change a collection in the registry");
+	}
+    }
     updateStamp++;
 }