[GHC] #12512: UnboxedTupleRep-related panic involving typeclasses
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash Test Case: | Blocked By: Blocking: | Related Tickets: #11723 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- You can trigger a GHC panic by abusing `UnboxedTupleRep` in just the right way: {{{#!hs {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE UnboxedTuples #-} import GHC.Exts class Wat (a :: TYPE 'UnboxedTupleRep) deriving instance Wat (# a, b #) }}} {{{ $ /opt/ghc/8.0.1/bin/ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): newTyConEtadArity (#,#) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This is probably a leak that #11723 didn't plug, as it only considered datatypes, not typeclasses. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * owner: => goldfire Comment: Urgh. `UnboxedTupleRep` is a lie, and liars never prosper. This falls in my pile, but it will be a little while until I get to it, so if you (for any value of "you") are inspired, go for it. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D2557 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: patch Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.0.2 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => merge Comment: Phab:D2557 has been merged to `master` as 23cf32da/ghc. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: merge Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Merged to `ghc-8.0 ` as c448d5513d68da7077b2b4d3adadda93120d8504. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12512: UnboxedTupleRep-related panic involving typeclasses -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: #11723 | Differential Rev(s): Phab:D2557 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ryan Scott <ryan.gl.scott@…>): In [changeset:"9cb289abc582c9eb8337a2621baf58e35feeff46/ghc" 9cb289ab/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="9cb289abc582c9eb8337a2621baf58e35feeff46" Remove hack put in place for #12512 Summary: Previously, I added an ad hoc check for unboxed tuples and sums in standalone-derived instances to fix #12512, under the pretense that polymorphism over `UnboxedTupleRep` and `UnboxedSumRep` was a lie. But that is no longer the case, and so this ad hoc check can be removed entirely. Less code, and easier to understand. Test Plan: make test TEST=T12512 Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4271 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC