patch applied (ghc-6.12/packages/base): hGetContents: close the handle properly on error

Ian Lynagh igloo at earth.li
Sun Nov 29 15:27:56 EST 2009


Wed Nov 25 04:34:35 PST 2009  Simon Marlow <marlowsd at gmail.com>
  * hGetContents: close the handle properly on error
  Ignore-this: bc37ff678acc6e547dc390285e056eb9
  
  When hGetContents caught an error it was closing the handle and then
  throwing the exception, without updating the handle with the new
  closed state.  This lead to a double-closed, which was the cause of
  
  *** glibc detected *** ./Setup: double free or corruption 
  
  when iconv_close was called twice on the decoder.
  
  See http://hackage.haskell.org/trac/hackage/ticket/609

    M ./GHC/IO/Handle/Text.hs -5 +9

View patch online:
http://darcs.haskell.org/ghc-6.12/packages/base/_darcs/patches/20091125123435-12142-8ae6f2e4a96123e3a40afa9b3917df68741324bc.gz


More information about the Cvs-libraries mailing list