bugfix for LDV profiling on 64-bit platforms
authorSimon Marlow <simonmar@microsoft.com>
Thu, 23 Feb 2006 15:09:04 +0000 (15:09 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 23 Feb 2006 15:09:04 +0000 (15:09 +0000)
There was an integer overflow in the definition of LDV_RECORD_CREATE
when StgWord is 64 bits.

ghc/includes/StgLdvProf.h

index f5f7ae2..3c3df1c 100644 (file)
@@ -25,7 +25,7 @@
  */
 #ifndef CMINUSMINUS
 #define LDV_RECORD_CREATE(c)   \
-  LDVW((c)) = (RTS_DEREF(era) << LDV_SHIFT) | LDV_STATE_CREATE
+  LDVW((c)) = ((StgWord)RTS_DEREF(era) << LDV_SHIFT) | LDV_STATE_CREATE
 #endif
 
 #ifdef CMINUSMINUS