The following simple but wrong program causes a bus error. [It is the
`boiled down' version of a much longer program; the first line
accidentally slipped into the program because I developed it under
Hugs.]
> main = 2
> main = putStrLn "hello world"
Ralf
===============================================================================
blei 276> ghc -v Test/Test.lhs
The Glorious Glasgow Haskell Compilation System, version 2.02, patchlevel 0
literate pre-processor:
echo '#line 1 "Test/Test.lhs"' > /tmp/ghc16653.lpp &&
/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02/unlit Test/Test.lhs - >>
/tmp/ghc16653.lpp
real 0.0
user 0.0
sys 0.0
Ineffective C pre-processor:
echo '#line 1 "Test/Test.lhs"' > /tmp/ghc16653.cpp && cat /tmp/ghc16653.lpp >>
/tmp/ghc16653.cpp
real 0.0
user 0.0
sys 0.0
Haskell compiler:
/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02/hsc ,-W
,/tmp/ghc16653.cpp -hisuf-prelude=.hi -hisuf=.hi -fignore-interface-pragmas
-fomit-interface-pragmas -fsimplify \( -ffloat-lets-exposing-whnf -ffloat-primops-ok
-fcase-of-case -freuse-con -fpedantic-bottoms -fsimpl-uf-use-threshold0
-fessential-unfoldings-only -fmax-simplifier-iterations4 \)
-himap=.:/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02/imports -v
-hifile=/tmp/ghc16653.hi -S=/tmp/ghc16653.s +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 2.02, for Haskell 1.3
real 1.6
user 1.5
sys 0.0
Pin on Haskell consistency info:
echo '
.text
hsc.Test.Test.lhs.31.0..:' >> /tmp/ghc16653.s
real 0.0
user 0.0
sys 0.0
*** New hi file follows...
{-# GHC_PRAGMA INTERFACE VERSION 20 #-}
_interface_ Main
_instance_modules_
PrelNum Foreign
_usages_
ArrBase 5 :: $d5 1 MutableArray 1 MutableVar 1;
Foreign 5 :: $d4 4;
IOBase 12 :: $d1 2 $d10 2 $d11 2 $d13 2 $d14 2 $d15 11 $d17 11 $d18 11 $d2 2 $d3 2 $d4
2 $d5 11 $d8 11 $d9 11 BufferMode 2 Handle 2 Handle__ 2 IO 2 IOError 2 IOErrorType 2;
Ix 5 :: $d4 1 $d5 4 $d6 4 $d7 4 $d8 4 $d9 4 Ix 1;
PrelBase 5 :: $d1 4 $d11 4 $d14 4 $d15 4 $d2 4 $d21 4 $d26 1 $d27 4 $d3 4 $d32 4 $d33
4 $d34 4 $d36 4 $d37 1 $d38 4 $d39 1 $d40 1 $d41 1 $d43 1 $d44 1 $d46 1 $d47 1 $d48 1
$d49 1 $d51 1 $d52 1 $d53 1 $d54 4 $d55 4 $d56 4 $d58 4 $d59 1 $d6 4 $d60 1 $d61 4
$d62 4 $d63 1 $d64 1 $d7 1 $d8 4 Addr 1 Either 1 Eq 1 Eval 1 ForeignObj 1 Maybe 1 Num
1 Ord 1 Ordering 1 Show 1 ShowS 1 String 1;
PrelIO 16 :: putStrLn 15;
PrelNum 8 :: $d10 1 $d16 1 $d17 1 $d18 1 $d28 7 $d29 7 $d33 7 $d34 7 $d35 7;
PrelTup 5 :: $d13 1 $d4 1 $d49 1 $d9 1;
STBase 5 :: $d9 1;
_exports_
Main main;
_declarations_
main _:_ PrelBase.Int ;;
Module version unchanged at 1
Replace .hi file, if changed:
cmp -s Test/Test.hi /tmp/ghc16653.hi-new || ( rm -f Test/Test.hi && cp
/tmp/ghc16653.hi-new Test/Test.hi )
real 0.0
user 0.0
sys 0.0
Unix assembler:
gcc -o Test/Test.o -c /tmp/ghc16653.s
real 0.1
user 0.0
sys 0.0
Linker:
gcc -v Test/Test.o
/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02/TopClosure.o
-L/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02 -lHS -lHS_cbits -lHSrts
-lHSclib -lgmp -lm
Reading specs from
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/specs
gcc version 2.7.2
/usr/ccs/bin/ld -V -Y P,/usr/ccs/lib:/usr/lib -Qy
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/crt1.o
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/crti.o
/usr/ccs/lib/values-Xa.o
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/crtbegin.o
-L/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02
-L/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2 -L/usr/ccs/bin
-L/usr/ccs/lib -L/usr/local/gnu/gcc-2.7.2/lib Test/Test.o
/home/III/a/ralf/FP/fptools/lib/sparc-sun-solaris2/ghc-2.02/TopClosure.o -lHS
-lHS_cbits -lHSrts -lHSclib -lgmp -lm -lgcc -lc -lgcc
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/crtend.o
/usr/local/gnu/gcc-2.7.2/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/crtn.o
ld: Software Generation Utilities (SGU) SunOS/ELF (LK-2.0 (S/I) - versioning)
real 1.9
user 0.3
sys 0.2
Checking consistency of: a.out
rm -f /tmp/ghc16653*
blei 277> a.out
Bus error (core dumped)
blei 278> uname -a
SunOS blei 5.5.1 Generic sun4u sparc SUNW,Ultra-1