Re: [GHC] #13615: Nondeterminism in ‘pure’ function w/ parallel evaluation & memo combinators
GHC
ghc-devs at haskell.org
Tue May 2 00:37:34 UTC 2017
#13615: Nondeterminism in ‘pure’ function w/ parallel evaluation & memo combinators
-------------------------------------+-------------------------------------
Reporter: pacak | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone: 8.2.1
Component: Compiler | Version: 8.2.1-rc2
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 glguy):
I believe I was experiencing this same bug in code that used
Foreign.Marshal.Unsafe.unsafeLocalState and par together
https://github.com/glguy/kami-solver/blob/master/src/Kami.hs#L172-L181
unsafeLocalState is defined as unsafeDupablePerformIO. Switching to
unsafePerformIO (which adds the noDuplicate) resolved the random
segmentation faults.
I'm just adding this comment here in case it becomes useful at some point.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13615#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list