Non-deterministic pure code in Data.Typeable
|Reported by:||guest||Owned by:|
|Operating System:||MacOS X||Architecture:||x86_64 (amd64)|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
Comparing the result of 'typeOf ()' performed in different threads sometimes yields true and sometimes false. To reproduce compile the attached source file with
ghc-7.0.3 -threaded -rtsopts TypeRepEq.hs
And execute it in a shell loop. Looping the inside the Haskell program will usually not show the bug.
while true ; do ./TypeReqEq +RTS -N ; done
Every program run will print either "Ok" or "typeOf () /= typeOf ()". The latter would indicate the bug.
The issue has been discussed on the glasgow-haskell-users mailing list in this thread: http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/20754
Different people said that they can reproduce the bug on Mac OS X and Linux with different versions of GHC 6.12.x and 7.0.x. GHC 7.2 does not show the bug.