[GHC] #11760: runST with lazy blackholing breaks referential transparency
GHC
ghc-devs at haskell.org
Thu Oct 13 05:54:09 UTC 2016
#11760: runST with lazy blackholing breaks referential transparency
-------------------------------------+-------------------------------------
Reporter: Yuras | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by NeilMitchell):
It turns out the widely used zlib library suffers from exactly this issue,
and can segfault when executed in parallel. See
https://github.com/haskell/zlib/issues/7#issuecomment-253028108 for more
details.
It seems like adding {{{noDuplicate}}} to {{{runST}}} and adding
{{{unsafeRunST}}} is a reasonable compromise. There may be a performance
impact on {{{runST}}}, but having segfaults/value-changes should require
typing something with the word {{{unsafe}}} in it at some point.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11760#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list