Ticket #5111 (closed bug: duplicate)
linux-powerpc : segfault in stage2 compiler
|Reported by:||erikd||Owned by:|
|Type of failure:||Installing GHC failed||Difficulty:|
|Test Case:||Blocked By:|
After the patch to fix #4999, the compile gets a bit further and now crashes at:
"inplace/bin/ghc-stage2" -H32m -O -package-name vector-0.7.0.1 -hide-all-packages -i -ilibraries/vector/. -ilibraries/vector/dist-install/build -ilibraries/vector/dist-install/build/autogen -Ilibraries/vector/dist-install/build -Ilibraries/vector/dist-install/build/autogen -Ilibraries/vector/include -Ilibraries/vector/internal -optP-DVECTOR_BOUNDS_CHECKS -optP-include -optPlibraries/vector/dist-install/build/autogen/cabal_macros.h -package base-184.108.40.206 -package primitive-0.3.1 -O2 -XHaskell98 -XCPP -XDeriveDataTypeable -O2 -XGenerics -no-user-package-conf -rtsopts -odir libraries/vector/dist-install/build -hidir libraries/vector/dist-install/build -stubdir libraries/vector/dist-install/build -hisuf hi -osuf o -hcsuf hc -c libraries/vector/./Data/Vector/Fusion/Stream/Monadic.hs -o libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package primitive-0.3.1 ... linking ... done. Loading package ffi-1.0 ... linking ... done. Segmentation fault make: *** [libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o] Error 139 make: *** [all] Error 2
Compiling with debug on and running under gdb results in:
Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package primitive-0.3.1 ... linking ... done. Loading package ffi-1.0 ... linking ... done. Program received signal SIGSEGV, Segmentation fault. 0xf19ea004 in ?? () (gdb) bt #0 0xf19ea004 in ?? () #1 0x11a30f58 in schedule (initialCapability=0x93fb0070, task=0x3dc0f1de) at rts/Schedule.c:457 Backtrace stopped: previous frame inner to this frame (corrupt stack?)
so this is crashing in haskell code, not the RTS.
Tracing this using putStr and friends I've tracked the bug to TcSplice?.runMeta. It seems to crash when a thunk is evaluated just as that function returns. I'm still working on tracing back from there.