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,386
    • Issues 4,386
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 371
    • Merge Requests 371
  • 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
  • #9078

Closed
Open
Opened May 05, 2014 by robertce@trac-robertce

Segfault with makeStableName

Calling makeStableName on the same object many times causes a segfault. The following triggers this behaviour on both OSX and Linux-x86_64, provided it is compiled (it doesn't seem to occur if the call to makeStableName is interpreted).

module Main where

import Control.Monad
import System.Mem.StableName

main :: IO ()
main = replicateM_ 100000 (makeStableName foo)

foo :: Int
foo = 1

It seems to happen largely at random. The 100000 calls to makeStableName in the above example essentially guarantee its occurrence, but I have observed it happen with far fewer.

The reason this bug was discovered is it is causing frequent failures in Accelerate on 7.8.2. See https://github.com/AccelerateHS/accelerate/issues/162. In that case it seems to be causing more strange closure type errors than segfaults, but I assume it is the same root cause.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Assignee
Assign to
7.8.3
Milestone
7.8.3
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#9078