[GHC] #15602: PAP invariant of pointer tagging does not hold

GHC ghc-devs at haskell.org
Tue Sep 4 07:32:50 UTC 2018


#15602: PAP invariant of pointer tagging does not hold
-------------------------------------+-------------------------------------
           Reporter:  osa1           |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #15508, #13767
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The PAP invariant of pointer tagging says

 > the PAP entry code jumps to the function's entry code, so it must have a
 tagged pointer to the function closure in R1. We therefore assume that a
 PAP always contains a tagged pointer to the function closure.

 (from
 https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging)

 As discovered while debugging #15508, this currently does not hold. I
 tried to fix this in one PAP allocation site in Phab:D5051 but it somehow
 broke another test. We should review all PAP allocation sites and make
 sure the invariant holds, and then fix any bugs that this fix reveals.

 Relevant commits:

 - 6015a94f9108a502150565577b66c23650796639: Implements pointer tagging
 - f9c6d53fe997f1c560cda6f346f4b201711df37c: Fixes a PAP allocation site
 (#13767)

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


More information about the ghc-tickets mailing list