[GHC] #8329: dmdTransformDictSelSig panic
#8329: dmdTransformDictSelSig panic -----------------------------------+--------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- Installing `xmlhtml` with HEAD panicks, while it works in 7.6.3. {{{ ghc: panic! (the 'impossible' happened) (GHC version 7.7.20130918 for x86_64-unknown-linux): dmdTransformDictSelSig: split failed }}} I reduced this panic to four files: Common.hs {{{ module Common where import Data.String (fromString) encodingName :: String encodingName = fromString "" }}} Meta.hs {{{ {-# OPTIONS_GHC -O0 #-} module Meta where import Data.String }}} Parse.hs {{{ module Parse where import Meta }}} XmlHtml.hs {{{ module XmlHtml where import Parse import Common }}} Remove *.hi and *.o files and compile `ghc -O XmlHtml` to get the panic. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8329: dmdTransformDictSelSig panic ---------------------------------------+----------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.7 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 monoidal): * priority: normal => high Comment: I'm upgrading the priority since this is a regression and xmlhtml has about 14 reverse dependencies, including snap. (Feel free to downgrade back.) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8329: dmdTransformDictSelSig panic ---------------------------------------+----------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 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 simonpj): * owner: => simonpj * priority: high => highest Comment: Yes, we must fix this before 7.8 goes out. I know what is happening, but no time while at ICFP. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8329: dmdTransformDictSelSig panic ---------------------------------------+----------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 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 Simon Peyton Jones <simonpj@…>): In [changeset:9bd366642f495fe26db261317dd416de1ff854bc/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="9bd366642f495fe26db261317dd416de1ff854bc" Lift an unnecessary assumption in the demand analyser (fix Trac #8329) Here's the Note about the (simple) fix. Apparently #8329 prevented all 23 packages of the Snap framework from compiling. Note [Demand transformer for a ditionary selector] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we evaluate (op dict-expr) under demand 'd', then we can push the demand 'd' into the appropriate field of the dictionary. What *is* the appropriate field? We just look at the strictness signature of the class op, which will be something like: U(AAASAAAAA). Then replace the 'S' by the demand 'd'. For single-method classes, which are represented by newtypes the signature of 'op' won't look like U(...), so the splitProdDmd_maybe will fail. That's fine: if we are doing strictness analysis we are also doing inling, so we'll have inlined 'op' into a cast. So we can bale out in a conservative way, returning topDmdType. It is (just.. Trac #8329) possible to be running strictness analysis *without* having inlined class ops from single-method classes. Suppose you are using ghc --make; and the first module has a local -O0 flag. So you may load a class without interface pragmas, ie (currently) without an unfolding for the class ops. Now if a subsequent module in the --make sweep has a local -O flag you might do strictness analysis, but there is no inlining for the class op. This is wierd so I'm not worried about whether this optimises brilliantly; but it should not fall over. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8329: dmdTransformDictSelSig panic ---------------------------------------+----------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 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 Simon Peyton Jones <simonpj@…>): In [changeset:81d8da9bcb6348caf103b38d76423cb7d71136fa/testsuite]: {{{ #!CommitTicketReference repository="testsuite" revision="81d8da9bcb6348caf103b38d76423cb7d71136fa" Test Trac #8329 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8329: dmdTransformDictSelSig panic -------------------------------------------------+------------------------- Reporter: monoidal | Owner: Type: bug | simonpj Priority: highest | Status: Component: Compiler | closed Resolution: fixed | Milestone: Operating System: Unknown/Multiple | Version: 7.7 Type of failure: Compile-time crash | Keywords: Test Case: | Architecture: simplCore/should_compile/T8329 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => closed * testcase: => simplCore/should_compile/T8329 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8329#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC