DPH should not even be built if GhcProfiled
[ghc-hetmet.git] / rts / RtsUtils.c
index dc11cb4..e9da59f 100644 (file)
@@ -219,7 +219,7 @@ stgReallocBytes (void *p, int n, char *msg)
       stg_exit(EXIT_INTERNAL_ERROR);
     }
 #if defined(DEBUG)
-    removeAllocation(p, 0);
+    if (p != NULL) { removeAllocation(p, 0); }
     addAllocation(space, n2);
 #endif
     return space;
@@ -441,14 +441,14 @@ void printRtsInfo(void) {
     printf(" [(\"GHC RTS\", \"YES\")\n");
     mkRtsInfoPair("GHC version",             ProjectVersion);
     mkRtsInfoPair("RTS way",                 RtsWay);
-    mkRtsInfoPair("Host platform",           HostPlatform);
-    mkRtsInfoPair("Host architecture",       HostArch);
-    mkRtsInfoPair("Host OS",                 HostOS);
-    mkRtsInfoPair("Host vendor",             HostVendor);
     mkRtsInfoPair("Build platform",          BuildPlatform);
     mkRtsInfoPair("Build architecture",      BuildArch);
     mkRtsInfoPair("Build OS",                BuildOS);
     mkRtsInfoPair("Build vendor",            BuildVendor);
+    mkRtsInfoPair("Host platform",           HostPlatform);
+    mkRtsInfoPair("Host architecture",       HostArch);
+    mkRtsInfoPair("Host OS",                 HostOS);
+    mkRtsInfoPair("Host vendor",             HostVendor);
     mkRtsInfoPair("Target platform",         TargetPlatform);
     mkRtsInfoPair("Target architecture",     TargetArch);
     mkRtsInfoPair("Target OS",               TargetOS);