id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty	ghcversion	platform
172	bug in zlib binding makes cabal-install segfault	guest	duncan	"Using the newest library version on hackage, ""cabal update"" segfaults after downloading the package list from hackage. ""cabal install"" produces the error  
""cabal: Data.ByteString.Lazy.index: index too large: 0""

steps to reproduce the problem (at least for me): install the newest versions of Cabal (1.2.2.0), HTTP (3001.0.0), and zlib (0.4.0.1) from hackage, compile and install cabal-install (0.4.0) from hackage, create a directory called dist (to circumvent another problem with cabal-install), run cabal update, or cabal install

os: Linux[[BR]]
arch: i686[[BR]]
ghc: 6.6[[BR]]
zlib: 1.1.4[[BR]]

Here are the last lines of the output of ""ltrace cabal update"":

{{{
open64(""/home/doserj/.cabal/packages/hac""..., 2369, 0666) = 4
__fxstat64(3, 4, 0x909108)                = 0
fcntl(4, 3, 0x909108, 1, 0x900060)        = 34817
fcntl(4, 4, 34817, 1, 0x900060)           = 0
__fxstat64(3, 4, 0xbfff8c90)              = 0
isatty(4)                                 = 0
ftruncate64(4, 0, 0, 0, 0)                = 0
malloc(56)                                = 0x875aa30
inflateInit2_(0x875aa30, 31, 0x8285868, 56, 0) = -2
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
}}}




"	defect	closed	normal		miscellaneous		normal	fixed			hard (< 1 day)	6.6	Linux
