[GHC] #13710: panic with boot and -jX
GHC
ghc-devs at haskell.org
Thu May 18 05:01:18 UTC 2017
#13710: panic with boot and -jX
-------------------------------------+-------------------------------------
Reporter: pacak | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1-rc2
Resolution: | Keywords: hs-boot
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by pacak):
Panic in rc2, successfull compilation in 8.0 and 7.10
{{{
% cat A.hs
{-# LANGUAGE RecordWildCards #-}
module A where
import B
type E = ()
yay :: Maybe ()
yay = do
H{..} <- undefined
undefined
}}}
{{{
% cat A.hs-boot
module A ( E ) where
type E = ()
}}}
{{{
% cat B.hs
module B where
import {-# SOURCE #-} A
data F a = F a
type G = F (Maybe E)
data H = H { h :: {-# UNPACK #-} !G }
}}}
rc2, -j1
{{{
% rm *.hi* *.o* ; ghc -j1 -O2 A.hs
[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot )
[2 of 3] Compiling B ( B.hs, B.o )
[3 of 3] Compiling A ( A.hs, A.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.0.20170503 for x86_64-unknown-linux):
tcIfaceGlobal (local): not found
You are in a maze of twisty little passages, all alike.
While forcing the thunk for TyThing E
which was lazily initialized by initIfaceCheck typecheckLoop,
I tried to tie the knot, but I couldn't find E
in the current type environment.
If you are developing GHC, please read Note [Tying the knot]
and Note [Type-checking inside the knot].
Consider rebuilding GHC with profiling for a better stack trace.
Contents of current type environment: []
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1134:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
ghc:Outputable
pprPanic, called at compiler/iface/TcIface.hs:1689:23 in
ghc:TcIface
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
rc2, -j2 - note - error message is slightly different + it's in color
{{{
% rm *.hi* *.o* ; ghc -j2 -O2 A.hs
[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot )
[2 of 3] Compiling B ( B.hs, B.o )
[3 of 3] Compiling A ( A.hs, A.o )
<no location info>: error:
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.0.20170503 for x86_64-unknown-linux):
tcIfaceGlobal (local): not found
You are in a maze of twisty little passages, all alike.
While forcing the thunk for TyThing E
which was lazily initialized by initIfaceCheck typecheckLoop,
I tried to tie the knot, but I couldn't find E
in the current type environment.
If you are developing GHC, please read Note [Tying the knot]
and Note [Type-checking inside the knot].
Consider rebuilding GHC with profiling for a better stack trace.
Contents of current type environment: []
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1134:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
ghc:Outputable
pprPanic, called at compiler/iface/TcIface.hs:1689:23 in
ghc:TcIface
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
ghc 8.0:
{{{
% rm *.hi* *.o* ; ghc -j1 -O2 A.hs
[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot )
[2 of 3] Compiling B ( B.hs, B.o )
[3 of 3] Compiling A ( A.hs, A.o )
}}}
{{{
% rm *.hi* *.o* ; ghc -j2 -O2 A.hs
[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot )
[2 of 3] Compiling B ( B.hs, B.o )
[3 of 3] Compiling A ( A.hs, A.o )
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13710#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list