[GHC] #16302: A non-function coerced to a function can cause a stg_ap_v_ret

GHC ghc-devs at haskell.org
Mon Feb 11 06:16:41 UTC 2019


#16302: A non-function coerced to a function can cause a stg_ap_v_ret
-------------------------------------+-------------------------------------
        Reporter:  WheatWizard       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by WheatWizard):

 Replying to [comment:1 potato44]:
 > I don't think this counts as a bug because we don't have many guarantees
 about `unsafeCoerce` besides for newtypes.
 >
 > I think it might be easier for others to read the bug report if you were
 to ungolf the code.
 >

 That seems like a fair assessment. I wouldn't really expect this code to
 do anything meaningful. In fact a segmentation fault seems like a very
 likely outcome.  But the compiler did ask me to report it so I thought it
 would be better safe than sorry.

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


More information about the ghc-tickets mailing list