[GHC] #7033: stale .tix files can cause programs built with -fhpc to segfault

GHC ghc-devs at haskell.org
Tue Nov 25 19:08:19 UTC 2014


#7033: stale .tix files can cause programs built with -fhpc to segfault
-------------------------------------+-------------------------------------
              Reporter:  jwlato      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Code        |          Version:  7.4.2
  Coverage                           |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  Runtime     |  Related Tickets:
  crash                              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by thomie):

 Confirmed with HEAD, ghc-7.9.20141121, although it never segfaults. I
 always get

 {{{
 Hpc failure: module mismatch with .tix/.mix file hash number
 (perhaps remove foo.tix file?)
 }}}

 With 7.4.1, it segfaults about 10% of the times when I add `module Main
 where` to the top of `foo.hs`.


 To reproduce, save `foo.hs` and `Bar.hs` in subdirectory `original`. Then
 run the following script.
 {{{
 set -x
 GHC=ghc
 rm foo* Bar*
 cp original/*.hs .
 $GHC -O -fhpc foo.hs
 ./foo
 cat foo.tix
 mv Bar.hs Bar.hs.orig
 sed -e 's/import/-- import/' -i.bak foo.hs
 rm -f *.hi *.o
 $GHC -O -fhpc foo.hs
 ./foo
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7033#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list