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

GHC ghc-devs at haskell.org
Fri Jan 26 09:39:55 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):

 Replying to [comment:16 heisenbug]:
 > Replying to [comment:15 alexbiehl]:

 Alex, if you manage to put together a tentative patch, feel free to check
 it in to the branch and push. That will trigger the CI machinery.

 > > Ha, got it!
 > >
 > > `evtWrite` is defined as
 > >
 >
 > [snip]
 >
 > Yeah, a simple `main = print evtWrite` will show the issue. I just had a
 long dog walk, thanks for reducing this! Yesterday I checked the diffs in
 the generated Cmm and the '''only''' change was that the
 `evtWrite_closure+1` gets passed (instead of `evtWrite_closure`). So your
 analysis sounds reasonable. The callee thinks it got the dereferenced
 `Int`, but actually it is a tagged pointer. This is somehow related to the
 fact that the `newtype` is defined in another module.

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


More information about the ghc-tickets mailing list