[GHC] #15038: Memory Corruption (strange closure type)

GHC ghc-devs at haskell.org
Tue May 1 15:11:05 UTC 2018


#15038: Memory Corruption (strange closure type)
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9718             |  Differential Rev(s):  Phab:D4652
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 Fair enough. Sorry I'm confused because the title says "predicting what
 CorePrep will do" not "predicting what CodePrep and later stages
 (including code generator) do".

 I think for efficiency reasons unboxed sums should really not make things
 CAFFY (similar to how unboxed tuples or unboxed literals do not make
 things CAFFY) so whatever we'll be using for the absent pointer values
 should not be considered as CAFFY in the code generator. Phab:D4652 fixes
 this so I think it's "something that is necessary regardless" and not a
 temporary workaround (e.g. would not be reverted after #9718).

 As mentioned in the diff there's an alternative implementation that I
 think wouldn't need the business with stable pointers, while still fixing
 the problems with the type error and making things CAFFY.

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


More information about the ghc-tickets mailing list