
#9878: Static pointers in GHCi cause panic -------------------------------------+------------------------------------- Reporter: monoidal | Owner: facundo.dominguez Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHCi crash | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by mboes):
Then we need to decide what to do with the SPT implementation. To make it thread-safe we can use a readers-writer lock implemented with mutexes, or maybe someone can suggest a better alternative.
-XStaticPointers is limited to the following use case: the universe of static forms that exist in the program is fixed at compile time and constant throughout the lifetime of the program. Using the `static` keyword inside GHCi does not fit this assumption, nor does dynamic (runtime) code linking. So the more pressing question is, in the original intended use case, are there ever concurrent updates to the SPT? That is, does module initialization happen concurrently at runtime? If not, then let's keep it simple... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9878#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler