Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,829
    • Issues 4,829
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 445
    • Merge requests 445
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #5111

Closed
Open
Created Apr 13, 2011 by erikd@trac-erikd

linux-powerpc : segfault in stage2 compiler

After the patch to fix #4999 (closed), 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-4.3.1.0 -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[1]: *** [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.

Trac metadata
Trac field Value
Version 7.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking