Ticket #5869 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

Compiling the Haskell bindings for ROSE causes a ghc panic

Reported by: axch Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.12.1
Keywords: Cc: axch@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I tried to build the ROSE compiler infrastructure project (rosecompiler.org) on my Debian box. I managed to coerce everything else into at least appearing to work, but when GHC was compiling the Haskell bindings module, it crashed and asked me to report the crash as a bug, so I am doing so. I should note that the configure script supplied with ROSE refused to configure in the absence of GHC 6.10 until I edited it, so perhaps this issue is known, at least to the ROSE team (or maybe they had something else in mind). Anyway, I am reporting the bug like I was told.

I'm running Debian Squeeze on x86_64, GHC version 6.12.1. Here is the relevant portion of the output from make:

/usr/bin/runghc Setup.hs build
Preprocessing library rose-0.9.5.1...
Building rose-0.9.5.1...
[  1 of 708] Compiling ROSE.CxxContainers ( ROSE/CxxContainers.hs, dist/build/ROSE/CxxContainers.o )
[  2 of 708] Compiling ROSE.Sage3.Classes ( ROSE/Sage3/Classes.hs, dist/build/ROSE/Sage3/Classes.o )
[  3 of 708] Compiling ROSE.Sage3.Misc[boot] ( ROSE/Sage3/Misc.hs-boot, dist/build/ROSE/Sage3/Misc.o-boot )
[  4 of 708] Compiling ROSE.Sage3.Methods.SgNode ( ROSE/Sage3/Methods/SgNode.hs, dist/build/ROSE/Sage3/Methods/SgNode.o )
[  5 of 708] Compiling ROSE.Sage3.Misc  ( ROSE/Sage3/Misc.hs, dist/build/ROSE/Sage3/Misc.o )
[  6 of 708] Compiling ROSE.Sage3.Methods.SgSupport ( ROSE/Sage3/Methods/SgSupport.hs, dist/build/ROSE/Sage3/Methods/SgSupport.o )
[  7 of 708] Compiling ROSE.Sage3.Methods.SgModifier ( ROSE/Sage3/Methods/SgModifier.hs, dist/build/ROSE/Sage3/Methods/SgModifier.o )
[  8 of 708] Compiling ROSE.Sage3.Methods.SgModifierNodes ( ROSE/Sage3/Methods/SgModifierNodes.hs, dist/build/ROSE/Sage3/Methods/SgModifierNodes.o )
[  9 of 708] Compiling ROSE.Sage3.Methods.SgConstVolatileModifier ( ROSE/Sage3/Methods/SgConstVolatileModifier.hs, dist/build/ROSE/Sage3/Methods/SgConstVolatileModifier.o )
[ 10 of 708] Compiling ROSE.Sage3.Methods.SgStorageModifier ( ROSE/Sage3/Methods/SgStorageModifier.hs, dist/build/ROSE/Sage3/Methods/SgStorageModifier.o )
[ 11 of 708] Compiling ROSE.Sage3.Methods.SgAccessModifier ( ROSE/Sage3/Methods/SgAccessModifier.hs, dist/build/ROSE/Sage3/Methods/SgAccessModifier.o )
[ 12 of 708] Compiling ROSE.Sage3.Methods.SgFunctionModifier ( ROSE/Sage3/Methods/SgFunctionModifier.hs, dist/build/ROSE/Sage3/Methods/SgFunctionModifier.o )
[ 13 of 708] Compiling ROSE.Sage3.Methods.SgUPC_AccessModifier ( ROSE/Sage3/Methods/SgUPC_AccessModifier.hs, dist/build/ROSE/Sage3/Methods/SgUPC_AccessModifier.o )
[ 14 of 708] Compiling ROSE.Sage3.Methods.SgSpecialFunctionModifier ( ROSE/Sage3/Methods/SgSpecialFunctionModifier.hs, dist/build/ROSE/Sage3/Methods/SgSpecialFunctionModifier.o )
[ 15 of 708] Compiling ROSE.Sage3.Methods.SgElaboratedTypeModifier ( ROSE/Sage3/Methods/SgElaboratedTypeModifier.hs, dist/build/ROSE/Sage3/Methods/SgElaboratedTypeModifier.o )
[ 16 of 708] Compiling ROSE.Sage3.Methods.SgLinkageModifier ( ROSE/Sage3/Methods/SgLinkageModifier.hs, dist/build/ROSE/Sage3/Methods/SgLinkageModifier.o )
[ 17 of 708] Compiling ROSE.Sage3.Methods.SgBaseClassModifier ( ROSE/Sage3/Methods/SgBaseClassModifier.hs, dist/build/ROSE/Sage3/Methods/SgBaseClassModifier.o )
[ 18 of 708] Compiling ROSE.Sage3.Methods.SgTypeModifier ( ROSE/Sage3/Methods/SgTypeModifier.hs, dist/build/ROSE/Sage3/Methods/SgTypeModifier.o )
[ 19 of 708] Compiling ROSE.Sage3.Methods.SgDeclarationModifier ( ROSE/Sage3/Methods/SgDeclarationModifier.hs, dist/build/ROSE/Sage3/Methods/SgDeclarationModifier.o )
[ 20 of 708] Compiling ROSE.Sage3.Methods.SgOpenclAccessModeModifier ( ROSE/Sage3/Methods/SgOpenclAccessModeModifier.hs, dist/build/ROSE/Sage3/Methods/SgOpenclAccessModeModifier.o )
[ 21 of 708] Compiling ROSE.Sage3.Methods.SgSymbolTable ( ROSE/Sage3/Methods/SgSymbolTable.hs, dist/build/ROSE/Sage3/Methods/SgSymbolTable.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 6.12.1 for x86_64-unknown-linux):
	RegAllocLinear.getStackSlotFor: out of stack slots
   If you are trying to compile SHA1.hs from the crypto library then this
   is a known limitation in the linear allocator.

   Try enabling the graph colouring allocator with -fregs-graph instead.   You can still file a bug report if you like.


Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Debian-specific note: please remove old .hi files and try again.
For details, see /usr/share/doc/ghc6/README.Debian

I also enclose the offending source file as an attachment, in case that will help.

Thank you,

~Alexey

Attachments

SgSymbolTable.hs Download (34.0 KB) - added by axch 15 months ago.
Source file that caused the reported ghc panic

Change History

Changed 15 months ago by axch

Source file that caused the reported ghc panic

Changed 15 months ago by axch

  • cc axch@… added

Carrying out the suggestion of compiling with -fregs-graph (by the mechanism of adding {-# OPTIONS_GHC -fregs-graph #-} to the offending source file) produces this:

Preprocessing library rose-0.9.5.1...
Building rose-0.9.5.1...
[ 21 of 708] Compiling ROSE.Sage3.Methods.SgSymbolTable ( ROSE/Sage3/Methods/SgSymbolTable.hs, dist/build/ROSE/Sage3/Methods/SgSymbolTable.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 6.12.1 for x86_64-unknown-linux):
	regSpill: out of spill slots!
       regs to spill = 2103
       slots left    = 2040

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Debian-specific note: please remove old .hi files and try again.
For details, see /usr/share/doc/ghc6/README.Debian

P.S. This is ROSE version 0.9.5a

Changed 15 months ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed

Thanks for the report. However, this looks like a duplicate of #1993, and should work in more recent versions of GHC thanks to #2790.

If you still have problems with GHC >= 7.4.1, please reopen.

Note: See TracTickets for help on using tickets.