[GHC] #13132: Compilation fails with a panic: get_op runContT

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | 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 or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Compiling 'tersmu' from Hackage fails with the following: {{{ [13 of 16] Compiling ParseM ( ParseM.hs, ParseM.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): get_op runContT Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} The code can be found [https://gitlab.com/zugz/tersmu here]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: 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 or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Have you tried with 8.0.2? It might be #10618 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: 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 or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I tried with 8.0.2 (`cabal install tersmu`) and the same panic exists. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: 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 or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Here's a minimal test case: {{{#!hs module Bug where newtype ContT r m a = ContT { runContT :: (a -> m r) -> m r } foo = (`runContT` bar.baz) }}} {{{ $ ghc Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): get_op runContT }}} Also reproducible on GHC HEAD. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: 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 or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: adamgundry (added) Comment: The culprit is commit b1884b0e62f62e3c0859515c4137124ab0c9560e (Implement DuplicateRecordFields). Thoughts, Adam? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: 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 or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by adamgundry): Thanks for tracking this down. It looks like `get_op` is missing a case for `HsRecFld`. The unambiguous case is easy, something like: {{{#!hs get_op (L _ (HsRecFld (Unambiguous _ n))) = n }}} That should fix the bug when `DuplicateRecordFields` is disabled, at least. Unfortunately the case for `Ambiguous` (which may arise when when `DuplicateRecordFields` is enabled) is harder, because we don't know which `Name` is meant. I'll try to take a look at this, but it may not be very soon. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF 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: | -------------------------------------+------------------------------------- Changes (by adamgundry): * keywords: => ORF -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF 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 simonpj): Ben/David/Reid: could you fix the unambiguous case as above, add a test; and add another expect_broken test for the ambiguous case. And then assign to Adam? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF 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: | -------------------------------------+------------------------------------- Changes (by rwbarton): * owner: => rwbarton -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * testcase: => rename/should_compile/T13132 * differential: => Phab:D2985 Comment: I posted a diff fixing the unambiguous case as described above. I don't understand these extensions well enough to know whether it is actually possible for an ambiguous record selector to pass the renamer to this point, so I didn't add a failing test case for the ambiguous record field case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * owner: rwbarton => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * owner: => adamgundry -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT
-------------------------------------+-------------------------------------
Reporter: PoroCYon | Owner: adamgundry
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: ORF
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | rename/should_compile/T13132
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2985
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.2.1 Comment: Leaving this open until we also fix the ambiguous case described above. Adam, do you suppose you could have a look at this? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: adamgundry Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985 Wiki Page: | -------------------------------------+------------------------------------- Comment (by adamgundry): Yes, will do. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: adamgundry Type: bug | Status: patch Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132, | overloadedrecflds/should_fail/T13132_duplicaterecflds Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985, Wiki Page: | Phab:D3126 -------------------------------------+------------------------------------- Changes (by adamgundry): * status: new => patch * testcase: rename/should_compile/T13132 => rename/should_compile/T13132, overloadedrecflds/should_fail/T13132_duplicaterecflds * differential: Phab:D2985 => Phab:D2985, Phab:D3126 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13132: Compilation fails with a panic: get_op runContT
-------------------------------------+-------------------------------------
Reporter: PoroCYon | Owner: adamgundry
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: ORF
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | rename/should_compile/T13132,
| overloadedrecflds/should_fail/T13132_duplicaterecflds
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2985,
Wiki Page: | Phab:D3126
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#13132: Compilation fails with a panic: get_op runContT -------------------------------------+------------------------------------- Reporter: PoroCYon | Owner: adamgundry Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: ORF Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | rename/should_compile/T13132, | overloadedrecflds/should_fail/T13132_duplicaterecflds Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2985, Wiki Page: | Phab:D3126 -------------------------------------+------------------------------------- Changes (by adamgundry): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13132#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC