Opened 13 months ago

Last modified 8 months ago

#15602 new bug

PAP invariant of pointer tagging does not hold in profiling builds

Reported by: osa1 Owned by:
Priority: normal Milestone: 8.6.1
Component: Profiling Version: 8.5
Keywords: Cc: simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #15508, #13767 Differential Rev(s):
Wiki Page:

Description

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:

Change History (1)

comment:1 Changed 8 months ago by osa1

Component: CompilerProfiling
Summary: PAP invariant of pointer tagging does not holdPAP invariant of pointer tagging does not hold in profiling builds

I think this only happens when profiling. I'm not sure if the problem is in the RTS or generated code (compiler).

Note: See TracTickets for help on using tickets.