Segfaults and "PAP Object Entered" when profiling
## Summary
After upgrading [graphql-engine](https://github.com/hasura/graphql-engine) from 9.10 to 9.14.1 I saw consistent crashes on a particular payload, with:
graphql-engine-pro: internal error: PAP object (0x4492030188) entered!
(GHC version 9.14.1 for x86_64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
...in a profiling configuration. I variously compiled with ghcup-shipped ghc and a locally-built ghc from the `ghc-9.14.1-release` tag, tweaking the RTS and undoing it, and the results were less consistent: sometimes taking several attempts before crashing with a segfault or sometimes the PAP message I originally saw.
## Steps to reproduce
Unfortunately I couldn't find a small reproducer. I've attached the cabal.project files (one imports the other) that results in the crash. If someone wants to debug this in the actual context (doubtful) I can prepare a branch and instructions. If there are other debugging steps I can take or patches I can try I'm happy to do so.
[dev-sh-prof-time.project.local](/uploads/4952c5188f496bf5929780c3888cd2b3/dev-sh-prof-time.project.local)
[dev-sh-optimized.project.local](/uploads/3dc0f62931688b332a4b53d770dac094/dev-sh-optimized.project.local)
## Expected behavior
What do you expect the reproducer described above to do?
## Environment
* GHC version used: 9.14.1
Optional:
* Operating System: linux
* System Architecture: x86-64
* cabal: cabal-install version 3.16.1.0
issue