[GHC] #9494: Probable data corruption with GHCi 7.8.* and Zlib

GHC ghc-devs at haskell.org
Tue Sep 9 09:15:56 UTC 2014


#9494: Probable data corruption with GHCi 7.8.* and Zlib
-------------------------------------+-------------------------------------
              Reporter:  nominolo    |            Owner:  aseipp
                  Type:  bug         |           Status:  new
              Priority:  high        |        Milestone:
             Component:  GHCi        |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Incorrect   |       Blocked By:
  result at runtime                  |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by nominolo):

 Replying to [comment:3 rwbarton]:
 > The zlib library internally uses a bunch of unsafe functions
 (`unsafePerformIO`, `unsafeForeignPtrToPtr`) so this is also quite
 possibly just a bug in zlib. (See `Codec/Compression/Zlib/Stream.hsc`,
 it's quite scary.)

 Yes, it's possible. I looked through that module, but could find any use
 of the Really Scary `inlinePerformIO`. The scariest functions seem to be
 `push{Input,Output}Buffer`. Unless we know what really goes wrong, it's
 possible that other libraries have the same problem and may break in
 subtle ways on 7.8

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


More information about the ghc-tickets mailing list