[GHC] #7814: panic in PPC NCG

GHC cvs-ghc at haskell.org
Fri Apr 5 13:44:09 CEST 2013


#7814: panic in PPC NCG
--------------------------------+-------------------------------------------
Reporter:  heisenbug            |          Owner:          
    Type:  bug                  |         Status:  new     
Priority:  normal               |      Component:  Compiler
 Version:  7.7                  |       Keywords:          
      Os:  Unknown/Multiple     |   Architecture:  powerpc 
 Failure:  Building GHC failed  |      Blockedby:          
Blocking:                       |        Related:          
--------------------------------+-------------------------------------------
 I get panics in the NCG PPC register allocator while compiling these
 files:

   rts_dist_HC rts/dist/build/StgStdThunks.dyn_o
   rts_dist_HC rts/dist/build/StgStdThunks.thr_dyn_o
   rts_dist_HC rts/dist/build/StgStdThunks.l_dyn_o
   rts_dist_HC rts/dist/build/StgStdThunks.thr_l_dyn_o
   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Classes.o
   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/CString.o
   HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Debug.o

 The panic message is like this:
 {{{
 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 7.7.20130405 for powerpc-montavista-linux):
         allocateRegsAndSpill: Cannot read from uninitialized register
     %vI_nff

 }}}

 This makes the bootstapping of PPC cross compiler, ehm, delicate.

 There is a comment in compiler/nativeGen/RegAlloc/Linear/Main.hs:756

                 Nothing | reading   ->
                    pprPanic "allocateRegsAndSpill: Cannot read from
 uninitialized register" (ppr r)
                    -- NOTE: if the input to the NCG contains some
                    -- unreachable blocks with junk code, this panic
                    -- might be triggered.  Make sure you only feed
                    -- sensible code into the NCG.  In CmmPipeline we
                    -- call removeUnreachableBlocks at the end for this
                    -- reason.

 So we have a 'junk code' issue here.

 Any hints how I can debug this?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7814>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list