#3821: Trace.Hpc.Reflect.examineTix segfaults on 64bit
---------------------------------+------------------------------------------
    Reporter:  TristanAllwood    |       Owner:  a...@…         
        Type:  bug               |      Status:  new            
    Priority:  normal            |   Component:  Code Coverage  
     Version:  6.12.1            |    Keywords:                 
          Os:  Unknown/Multiple  |    Testcase:                 
Architecture:  x86_64 (amd64)    |     Failure:  None/Unknown   
---------------------------------+------------------------------------------

Comment(by TristanAllwood):

 Trac is failing to let me add the patch file - it's smallish so here it is
 inline...

 {{{
 Fri Jan 15 10:21:41 GMT 2010  [email protected]
   * Use a fixed size value when reading from Memory for ModuleInfo's

 New patches:

 [Use a fixed size value when reading from Memory for ModuleInfo's
 [email protected]**20100115102141
  Ignore-this: a7cef3dacbb29c22a12f654c616f500e
 ] {
 hunk ./Trace/Hpc/Reflect.hsc 43
        ptr <- hs_hpc_rootModule
        moduleInfoList ptr

 -data ModuleInfo = ModuleInfo String Int Hash (Ptr Word64)
 +data ModuleInfo = ModuleInfo String Word32 Hash (Ptr Word64)

  moduleInfoList :: Ptr () -> IO [ModuleInfo]
  moduleInfoList ptr
 hunk ./Trace/Hpc/Reflect.hsc 60

  clearTix :: IO ()
  clearTix = do
 -      sequence_ [ pokeArray ptr $ take count $ repeat 0
 +      sequence_ [ pokeArray ptr $ take (fromIntegral count) $ repeat 0
                 | ModuleInfo _mod count _hash ptr <- modInfo
                 ]
        return ()
 hunk ./Trace/Hpc/Reflect.hsc 68

  examineTix :: IO Tix
  examineTix = do
 -      mods <- sequence [ do tixs <- peekArray count ptr
 -                           return $ TixModule mod' hash count
 +      mods <- sequence [ do tixs <- peekArray (fromIntegral count) ptr
 +                           return $ TixModule mod' hash (fromIntegral
 count)
                                    $ map fromIntegral tixs
                        | (ModuleInfo mod' count hash ptr) <- modInfo
                        ]
 hunk ./Trace/Hpc/Reflect.hsc 85
                 | (ModuleInfo mod1 count1 hash1 ptr,
                    TixModule mod2 hash2 count2 tixs) <- zip modInfo
 modTixes
                 , if mod1 /= mod2
 -               || count1 /= count2
 +               || (fromIntegral count1) /= count2
                 || hash1 /= hash2
                 || length tixs /= count2
                   then error "updateTix failed"
 }

 Context:

 [Fix quoting in the "tough" test
 Ian Lynagh <[email protected]>**20100102174643]
 [Fix quoting in more tests
 Ian Lynagh <[email protected]>**20100102174616]
 [Fix quoting in some hpc tests
 Ian Lynagh <[email protected]>**20100102174221]
 [Fix tests/hpcrun.pl to handle paths containing spaces
 Ian Lynagh <[email protected]>**20100102173344]
 [Bump version number
 Ian Lynagh <[email protected]>**20091219201528]
 [Remove unused test bits
 Ian Lynagh <[email protected]>**20091219195119]
 [Fix some more hpc tests
 Ian Lynagh <[email protected]>**20091219194957]
 [Fix some hpc tests
 Ian Lynagh <[email protected]>**20091219192808]
 [Comment that we need to fix cleaning the tests
 Ian Lynagh <[email protected]>**20091219164941]
 [Tweak some hpc tests
 Ian Lynagh <[email protected]>**20091215215405]
 [Fix some quoting problems in the tests
 Ian Lynagh <[email protected]>**20091209194903]
 [Whitespace only
 Ian Lynagh <[email protected]>**20091203134407]
 [Follow testsuite driver changes
 Ian Lynagh <[email protected]>**20091128185017]
 [Update dependencies
 Ian Lynagh <[email protected]>**20090920152421]
 [Bump version to 0.5.0.4
 Ian Lynagh <[email protected]>**20090920141921]
 [Fix unused import warnings
 Ian Lynagh <[email protected]>**20090707133640]
 [Remove unused imports
 Ian Lynagh <[email protected]>**20090707115847]
 [TAG 2009-06-25
 Ian Lynagh <[email protected]>**20090625160250]
 Patch bundle hash:
 20b3a7d510206226e00ce3f8653484ba563f51ab
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3821#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to