Ticket #3821 (closed merge: fixed)
Trace.Hpc.Reflect.examineTix segfaults on 64bit
| Reported by: | TristanAllwood | Owned by: | igloo |
|---|---|---|---|
| Priority: | high | Milestone: | 6.12.2 |
| Component: | Code Coverage | Version: | 6.12.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | x86_64 (amd64) |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
The following seg-faults on my 64bit ghc 6.12.1 when compiled with -fhpc
module Main where import B import Trace.Hpc.Reflect main :: IO () main = do examineTix print (foo 3) return ()
module B where foo 0 = 0 foo n = 1 + foo (n-1)
>ghc --make -fforce-recomp -fhpc Main [1 of 2] Compiling B ( B.hs, B.o ) [2 of 2] Compiling Main ( Main.hs, Main.o ) Linking Main ... 10:21:55 - tora@colorado:/tmp/HPC >./Main Segmentation fault
I believe the cause is that data ModuleInfo = ModuleInfo String Int Hash (Ptr Word64) in Trace.Hpc.Reflect uses a variable sized Int instead of a fixed (32bit if I'm reading the sources correctly) Word32 for the count.
I've attached a patch that should fix the issue.
Change History
Note: See
TracTickets for help on using
tickets.
