crash in profiling mode

Janis Voigtlaender voigt@orchid.inf.tu-dresden.de
Tue, 29 Oct 2002 09:30:19 +0100


Hello,

I have a problem with profiling using a freshly installed GHC 5.04 under
Solaris. With the following program crash.lhs:

> module Main where

> test1 = print "test1"

> test2 = {-# SCC "test2" #-} print "test2"

> main = do c <- readLn
>           if c==1 then test1 else test2

I get the following runs:

~> ghc-5.04 -prof crash.lhs
~> ./a.out 
1
"test1"

~> ./a.out
2
Bus error
Exit 138

So, code compiled with a cost-center annotation crashes (note that I
didn't even run the compiled program in profiling mode). The same
happens, when compiler flags -auto or -auto-all are used. Hence, the
profiling facilities are useless on my installation.

Has anyone experienced such problem before? What could be broken with my
installation? Some library problems?

Any hint appreciated.

Regards, Janis.

--
Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:voigt@tcs.inf.tu-dresden.de