[GHC] #10052: Panic (something to do with floatExpr?)

Peter Wortmann scpmw at leeds.ac.uk
Wed Feb 4 17:24:11 UTC 2015



We are clearly trying to float past a breakpoint here, which is simply 
impossible. Pretty sure this would have been a panic before my changes 
too (it would have tried to "mkNoCount" the breakpoint). Guess I was 
wrong reading a "breakpoints don't appear here" invariant out of that...

The quick fix would be to drop all floats in-place:

   -- scoped, counting and unsplittable, can't be floated through
   | otherwise
   = floatBody tOP_LEVEL expr

This fixes the panic, but is a bit awkward. Probably better to change 
SetLevels? Not a piece of code I'm very familiar with...

Greetings,
   Peter

On 04/02/2015 13:31, Simon Peyton Jones wrote:
> Peter:
>
> Here's a bad crash, due to you.   (Doing this by email because I'm offline.)
>
> The (Tick t e) case of FloatOut.floatExpr is incomplete.  It simply panics in some cases.
>
> Could you fix this please?  Either that case shouldn't happen, in which case Core Lint should check for it, and whoever is generating it should be fixed.  Or it should happen, in which case floatExpr should do the right thing.
>
> Could you leave a Note to explain what is happening in the floatExpr (Tick ...) cases?
>
> Thanks
>
> Simon
>
> | -----Original Message-----
> | From: ghc-tickets [mailto:ghc-tickets-bounces at haskell.org] On Behalf Of
> | GHC
> | Sent: 31 January 2015 17:38
> | Cc: ghc-tickets at haskell.org
> | Subject: [GHC] #10052: Panic (something to do with floatExpr?)
> |
> | #10052: Panic (something to do with floatExpr?)
> | -------------------------------------+-----------------------------------
> | --
> |               Reporter:  edsko       |             Owner:
> |                   Type:  bug         |            Status:  new
> |               Priority:  normal      |         Milestone:
> |              Component:  Compiler    |           Version:  7.10.1-rc2
> |               Keywords:              |  Operating System:
> | Unknown/Multiple
> |           Architecture:              |   Type of failure:  None/Unknown
> |   Unknown/Multiple                   |        Blocked By:
> |              Test Case:              |   Related Tickets:
> |               Blocking:              |
> | Differential Revisions:              |
> | -------------------------------------+-----------------------------------
> | --
> |  Loading
> |
> |  {{{
> |  main = let (x :: String) = "hello" in putStrLn x
> |  }}}
> |
> |  using a very simple driver for the GHC API (see T145.hs) causes a ghc
> |  panic:
> |
> |  {{{
> |  [1 of 1] Compiling Main             ( T145-input.hs, interpreted )
> |  T145: T145: panic! (the 'impossible' happened)
> |    (GHC version 7.10.0.20150128 for x86_64-apple-darwin):
> |          floatExpr tick
> |  <<details unavailable>>
> |
> |  Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
> |  }}}
> |
> |  This panic is arising in our test case for #8333, so it may be related
> | to
> |  that bug.
> |
> | --
> | Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10052>
> | GHC <http://www.haskell.org/ghc/>
> | The Glasgow Haskell Compiler
> | _______________________________________________
> | ghc-tickets mailing list
> | ghc-tickets at haskell.org
> | http://www.haskell.org/mailman/listinfo/ghc-tickets
>



More information about the ghc-devs mailing list