Commit 9aa94586 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

Note STM's vulnerability to non-allocating loops

Test Plan: Read it

Reviewers: austin, fryguybob

Reviewed By: austin

Subscribers: thomie, fryguybob

Differential Revision: https://phabricator.haskell.org/D1523

GHC Trac Issues: #10639, #367
parent e9136762
......@@ -372,12 +372,14 @@ Bugs in GHC
- GHC's runtime system implements cooperative multitasking, with
context switching potentially occurring only when a program
allocates. This means that programs that do not allocate may never
context switch. See :ghc-ticket:`367` for further discussion.
context switch. This is especially true of programs using STM, which
may deadlock after observing inconsistent state. See :ghc-ticket:`367`
for further discussion.
If you are hit by this, you may want to compile the affected module
with ``-fno-omit-yields``. This flag ensures that yield points are
inserted at every function entrypoint (at the expense of a bit of
performance).
with ``-fno-omit-yields`` (see :ref:`options-f`). This flag ensures that
yield points are inserted at every function entrypoint (at the expense of a
bit of performance).
- GHC can warn about non-exhaustive or overlapping patterns (see
:ref:`options-sanity`), and usually does so correctly. But not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment