[GHC] #14677: Code generator does not correctly tag a pointer

GHC ghc-devs at haskell.org
Sat Jan 27 23:07:12 UTC 2018


#14677: Code generator does not correctly tag a pointer
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  14626
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by heisenbug):

 Okay, I got it working. I now simply exclude casted constructors (by
 looking at the unfolding template), as they seem to be implemented by
 IND_STATIC. (They should not, rather they could be simply alias labels?)
 Thus those won't get tagged closure pointers, and will be entered as
 before. There are 66 cases where this pessimisation is triggered in GHC,
 so I guess this is a low price to pay. All of those are related to the
 `Int -> Event` casting.

 Here is my fix:
 https://github.com/ghc/ghc/commit/eef0c057551ef860c1ace2e1c7509bcdc3c8eb91

 Simon, any idea how to do this better?

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


More information about the ghc-tickets mailing list