[GHC] #10712: Regression: make TEST=exceptionsrun001 WAY=optasm is failing

GHC ghc-devs at haskell.org
Fri Jul 31 00:44:57 UTC 2015


#10712: Regression: make TEST=exceptionsrun001 WAY=optasm is failing
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
                                     |  base/tests/exceptionsrun001
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Actually I just guessed and checked,
 7c0fff41789669450b02dc1db7f5d7babba5dee6 is the bad commit.

 {{{
    catch (ioError (userError "wibble"))
          (\(e::IOException) -> return ())
 }}}
 amounts to
 {{{
    catch# (raiseIO# (toException (userError "wibble")))
           ({- handler -})
           st
 }}}
 but
 * `raiseIO#`'s strictness signature claims it returns _|_
 * `catch#` is now strict in its first argument, as of the commit
 7c0fff41789
 so the strictness analyser concludes that `ioTest` will never return, and
 optimizes `main` to
 {{{
 Main.main1 =
   \ (@ b_aLH) (s_X2HT [OS=OneShot] :: State# RealWorld) ->
     case Main.ioTest1 s_X2HT of wild_00 { }
 }}}
 and what happens then when `ioTest` really does return is undefined.

 There are apparently good reasons for each of the two bulleted points, but
 as this test shows they are incompatible.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10712#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list