avoid 32-bit integer overflow (#5831)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 2 Feb 2012 10:28:34 +0000 (10:28 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 7 Feb 2012 13:23:56 +0000 (13:23 +0000)
rts/RtsUtils.c

index e04b984..b880f8c 100644 (file)
@@ -130,7 +130,7 @@ heapOverflow(void)
     {
         /* don't fflush(stdout); WORKAROUND bug in Linux glibc */
         OutOfHeapHook(0/*unknown request size*/,
-                      RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE);
+                      (lnat)RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE);
 
         heap_overflow = rtsTrue;
     }