patch applied (ghc-6.12/ghc): Fix a bug that can lead to
noDuplicate# not working sometimes.
igloo at earth.li
Wed Feb 17 18:04:23 EST 2010
Tue Feb 16 04:34:11 PST 2010 Simon Marlow <marlowsd at gmail.com>
* Fix a bug that can lead to noDuplicate# not working sometimes.
The symptom is that under some rare conditions when running in
parallel, an unsafePerformIO or unsafeInterleaveIO computation might
be duplicated, so e.g. lazy I/O might give the wrong answer (the
stream might appear to have duplicate parts or parts missing).
I have a program that demonstrates it -N3 or more, some lazy I/O, and
a lot of shared mutable state. See the comment with stg_noDuplicatezh
in PrimOps.cmm that explains the problem and the fix. This took me
about a day to find :-(
M ./rts/PrimOps.cmm -8 +71
View patch online:
More information about the Cvs-ghc