PAP invariant of pointer tagging does not hold in profiling builds
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 (closed), this currently does not hold. I tried to fix this in one PAP allocation site in 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:
- 6015a94f: Implements pointer tagging
- f9c6d53f: Fixes a PAP allocation site (#13767 (closed))
Trac metadata
Trac field | Value |
---|---|
Version | 8.5 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |