Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,389
    • Issues 4,389
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 374
    • Merge Requests 374
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #12622

Closed
Open
Opened Sep 25, 2016 by Mathieu Boespflug@mboes

Unboxed static pointers lead to missing SPT entries

I found what appears to be a regression following the merge of the new FloatOut based static pointers support. See https://github.com/mboes/bug-ptr-not-in-spt for a fully developed minimal example.

It seems to be quite hard to trigger this bug:

  • I need to be using distributed-closure (not bare StaticPtr).
  • The static pointer needs to be defined in a separate module.
  • The static pointer must refer to a value with at least one polymorphic argument.
  • Compiler optimization level 1 needs to be turned on.

At any rate, I wasn't able to trigger it without all conditions above being true. Initial investigations by facundominguez point to static pointer unpacking in distributed-closure as the culprit. Likely unpacked static pointers are no longer recognized as such by the FloatOut pass and therefore never floated to top-level, hence breaking a fundamental invariant about static pointers.

This might explain why sometimes static pointers don't get added to the static pointer table (SPT), as in the above minimal example.

Edited Mar 10, 2019 by Mathieu Boespflug
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#12622