Ticket #5456 (closed bug: fixed)

Opened 21 months ago

Last modified 21 months ago

the 'impossible' happened : Ix{Int}.index: Index (7168) out of range ((0,72))

Reported by: erikd Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.2.1
Keywords: Cc:
Operating System: Linux Architecture: powerpc
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Compiling Git head on powerpc-linux and get this:

"inplace/bin/ghc-stage1"   -H64m -O0 -fasm    -package-name ghc-prim-0.2.0.0 -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.    -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O0 -dcore-lint -no-user-package-conf -rtsopts     -odir libraries/ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/ghc-prim/./GHC/Generics.hs -o libraries/ghc-prim/dist-install/build/GHC/Generics.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.3.20110902 for powerpc-unknown-linux):
        Ix{Int}.index: Index (7168) out of range ((0,72))

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

GHC was compiling fine on this platform as little as 3 or 4 days ago.

Change History

Changed 21 months ago by erikd

Latest git pull results in:

"inplace/bin/ghc-stage1"   -H64m -O0 -fasm    -package-name base-4.4.0.0 -hide-all-packages -i -ilibraries/base/. -ilibraries/base/dist-install/build -ilibraries/base/dist-install/build/autogen -Ilibraries/base/dist-install/build -Ilibraries/base/dist-install/build/autogen -Ilibraries/base/include   -optP-DOPTIMISE_INTEGER_GCD_LCM -optP-include -optPlibraries/base/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.2.0.0 -package integer-gmp-0.3.0.0 -package rts-1.0  -package-name base -XHaskell98 -XCPP -O0 -dcore-lint -no-user-package-conf -rtsopts     -odir libraries/base/dist-install/build -hidir libraries/base/dist-install/build -stubdir libraries/base/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/base/dist-install/build/GHC/Event/EPoll.hs -o libraries/base/dist-install/build/GHC/Event/EPoll.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.3.20110902 for powerpc-unknown-linux):
        tyConFamilySize: base:GHC.Event.Internal.Backend{tc rh}

Changed 21 months ago by erikd

Seems to be this commit thats doing it:

commit de9b85fa3fb6d4cd593366e1f2383cd0b492c056
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Fri Sep 2 17:43:53 2011 +0100

    Export a tiny bit more info with AbstractTyCon (fixes #5424)

Changed 21 months ago by simonpj

I'm on this. My fault -- didn't make clean enough when validating. It is a mysterious error though!

Changed 21 months ago by simonpj

Wait -- there are two different errors reported here:

  • The Ix{Int} error is almost certainly due to a left-over .hi file after a change of interface-file format. Remove all .hi files and try again.
  • The tyConFamilySize thing is probably a real bug -- I am chasing.

Changed 21 months ago by erikd

You're probably right about the first one (The Ix{Int} error) being due to insufficient cleaning out of the build tree.

For the second one I was meticulous about cleaning before building.

Changed 21 months ago by simonpj

Yes, the second is a bug -- patch coming momentarily.

Changed 21 months ago by simonpj@…

commit 8595c61cfae514bc9582d4447ccca5db5a201133

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Mon Sep 5 09:38:50 2011 +0100

    Eliminate isHiBootTyCon in favour of isAbstractTyCon
    
    Fixes Trac #5456, which was a buglet arising from
    
      commit de9b85fa3fb6d4cd593366e1f2383cd0b492c056
      Author: Simon Peyton Jones <simonpj@microsoft.com>
      Date:   Fri Sep 2 17:43:53 2011 +0100
    
        Export a tiny bit more info with AbstractTyCon (fixes #5424)
    
    It only shows up when compiling with -O0!

 compiler/stgSyn/CoreToStg.lhs    |    6 +++---
 compiler/typecheck/TcTyDecls.lhs |    2 +-
 compiler/types/TyCon.lhs         |    7 -------
 3 files changed, 4 insertions(+), 11 deletions(-)

Changed 21 months ago by simonpj

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

Ha! I didn't spot it because I don't compile my libraries with -O0.

Thank you for identifying this.

Simon

Note: See TracTickets for help on using tickets.