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,385
    • Issues 4,385
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 369
    • Merge Requests 369
  • 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
  • #2161

Closed
Open
Opened Mar 17, 2008 by agl@trac-agl

finaliser of a ForeignPtr called while references from unreachable threads exist

I believe that I've managed to distill a crash which has been driving me crazy for a few days into a short enough test case (22 lines) that it might be useful.

In short: the threaded RTS will call the finialiser of a ForeignPtr while an exception handler still holds a reference to it:

% ghc -make fptest.hs cbits.c -threaded
[1 of 1] Compiling Main             ( fptest.hs, fptest.o )
Linking fptest ...
% ./fptest
New object getting created: 66f010
Finaliser getting called for 66f010
Use called for 66f010

I'm hoping that this is useful to someone who knows the RTS.

Cheers,

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Linux
Architecture x86_64 (amd64)
Edited Mar 09, 2019 by Simon Marlow
Assignee
Assign to
7.6.2
Milestone
7.6.2
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#2161