#5859: unsafeInterleaveIO duplicates computation when evaluated by multiple
threads
---------------------------------+------------------------------------------
    Reporter:  joeyadams         |       Owner:  simonpj                    
        Type:  bug               |      Status:  new                        
    Priority:  high              |   Milestone:  7.4.2                      
   Component:  libraries/base    |     Version:  7.2.2                      
    Keywords:                    |          Os:  Unknown/Multiple           
Architecture:  Unknown/Multiple  |     Failure:  Incorrect result at runtime
  Difficulty:  Unknown           |    Testcase:                             
   Blockedby:                    |    Blocking:                             
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 I tried disabling the use of the state hack (`isStateHackType`, via
 `isOneShotBndr`) in
 {{{
     simplCore/Simplify.lhs
     simplCore/OccurAnal.lhs
     simplCore/FloatIn.lhs
 }}}
 (the only other state hack uses are in `coreSyn/CoreArity.lhs`).

 This resulted in `perf/compiler/parsing001` failing slightly, and
 `perf/should_run/T5536` failing a lot. I looked into the latter. The
 attached program has
 {{{
      484268840 bytes allocated with the full state hack
     2085048512 bytes allocated with the state hack modified as above
 }}}
 Replacing either of the "if" expressions in the last few lines with just
 its "else" branch fixes the problem.

 I've also attached the `-ddump-simpl` output.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5859#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to