[GHC] #12128: ghci cause panic on 8.0.1

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following code panics when called with ghci: {{{#!hs module Foo where import GHC.TypeLits (Symbol) import Unsafe.Coerce instance Read Symbol where readsPrec = unsafeCoerce (readsPrec :: Int -> ReadS String) data Bar = TyCon !Symbol deriving (Read) }}} {{{ % ghci foo.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/zv/.ghc/ghci.conf [1 of 1] Compiling Foo ( foo.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): atomPrimRep case a1_s2AG of _ [Occ=Dead] { } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 ---------------------------------+---------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ---------------------------------+---------------------------------------- Changes (by zxtx): * os: Unknown/Multiple => Linux -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * priority: normal => high * os: Linux => Unknown/Multiple * milestone: => 8.0.2 Comment: Thank you for the report. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by seraphime): Seems to be a regression introduced in 1c9fd3f1c5522372fcaf250c805b959e8090a62c : Case-of-empty-alts is trivial (Trac #11155). Removing the line: {{{ cpe_ExprIsTrivial (Case e _ _ []) = cpe_ExprIsTrivial e }}} Fixes the issue, but breaks T11155 and T12212 in HEAD. I'm trying to find a workaround. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by seraphime): @zxtx, I made a quick hack which can get things working for you, while waiting for a real solution. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by seraphime): * Attachment "empty-case-not-trivial-in-interpreted-code.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by seraphime): * owner: => seraphime Comment: I will push the real patch later tonight -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by seraphime): * Attachment "empty-case-not-trivial-in-interpreted-code.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2374 Wiki Page: | -------------------------------------+------------------------------------- Changes (by seraphime): * differential: => Phab:D2374 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2374 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1
-------------------------------------+-------------------------------------
Reporter: zxtx | Owner: seraphime
Type: bug | Status: patch
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2374
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2374 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12128: ghci cause panic on 8.0.1
-------------------------------------+-------------------------------------
Reporter: zxtx | Owner: seraphime
Type: bug | Status: merge
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2374
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12128: ghci cause panic on 8.0.1 -------------------------------------+------------------------------------- Reporter: zxtx | Owner: seraphime Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2374 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12128#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC