[GHC] #9031: ghc panic: RegAlloc.Liveness.computeLivenss

#9031: ghc panic: RegAlloc.Liveness.computeLivenss -----------------------------------+--------------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- I have some code where ghc consistently panics with {{{ RegAlloc.Liveness.computeLivenss SCCs aren't in reverse dependent order bad blockId c1kek }}} The only reference I can find to that block in the dumped output is here: {{{ REC c1kej: movq $block{v c1keo}_info,(%rbp) movsd 7(%rbx),%vSSE_s1ivM movsd 15(%rbx),%vSSE_s1ivN movq 96(%rbp),%rbx movsd %vSSE_s1ivN,88(%rbp) movsd %vSSE_s1ivM,96(%rbp) testq $7,%rbx jne _c1keo jmp _c1kep c1kpo: movq $block{v c1kej}_info,(%rbp) movq %vI_s1it5,%rbx movq $0,120(%rbp) testq $7,%rbx jne _c1kej jmp _c1kek, }}} There doesn't appear to be any reference to {{{c1kpo}}} either. Unfortunately I don't yet have a test case I can provide; I'll keep working on that. Building with -dcore-lint and -dcmm-lint don't show any extra errors. This is with ghc-7.8.2 using NCG. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss ---------------------------------------+----------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by phaul): Hi, I think I am hitting the same issue after upgrading from 7.6.3 to 7.8.2. Previously the same code was building fine. I have my code on github. https://github.com/phaul/chess/tree/ghc-7.8.2. (You need the ghc-7.8.2 branch) The problematic module is '''Chess.Move.Generator'''. I get: {{{ [18 of 30] Compiling Chess.Move.Generator ( Chess/Move/Generator.hs, dist/build/chess/chess-tmp/Chess/Move/Generator.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.8.2 for i386-unknown-linux): RegAlloc.Liveness.computeLivenss SCCs aren't in reverse dependent order bad blockId c1AEd [NONREC c1AEI: }}} Can you try to use my code to reproduce the issue? Thanks Paul. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss ---------------------------------------+----------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by phaul): My code from above builds fine after changing ''-O2'' to ''-O0'' in the cabal file. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss ---------------------------------------+----------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by phaul): * cc: sonkoly.pal@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss ---------------------------------------+----------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by jwlato): Paul, thanks very much. I've created a self-contained test case based on your code (I believe it's the same issue I'm having). When I try to compile the attached files with {{{ ghc -O2 Top.hs }}} I get the same error. One interesting thing is that this error seems to require that `pawnAdvanceSquares` is called in multiple locations, even though in the generated core it only appears once. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss -------------------------------------+------------------------------------- Reporter: jwlato | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Compile- | Blocked By: time crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by jwlato): I can no longer reproduce this with ghc-7.8.3, so I think this can be closed now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9031: ghc panic: RegAlloc.Liveness.computeLivenss -------------------------------------+------------------------------------- Reporter: jwlato | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: worksforme | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Compile- | Blocked By: time crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => worksforme Comment: Closing by original reporter's suggestion. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9031#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC