[Zlib-devel] zlib 1.2.2.3 available for testing

Mark Adler madler at alumni.caltech.edu
Mon May 30 19:08:17 EDT 2005


On May 30, 2005, at 3:15 PM, Markus F.X.J. Oberhumer wrote:
> Note, this is just a wild guess:
>
> you seem to be using the non STDC version of gzprintf in gzio.c here, 
> which tries to simulate va_list, and on Alpha a 64-bit (pointer) to 
> 32-bit (int) truncation could happen.

I think Markus figured it out.  The string in gzprintf() is passed as a 
pointer, but the sprintf() call is trying to pass a bunch of int 
arguments.  From the compile flags:

     zlib version 1.2.2.3 = 0x1223, compile flags = 0x30000a9

the "...a9" (which was a9 for 1.2.2 as well) means that off_t, 
pointers, and longs are 64 bits, and ints are 32 bits.  Passing a 
64-bit pointer as a 32-bit int just won't work.  So without stdarg, 
there's no way to get gzprintf() to work in that environment.  
Apparently however that environment *does* have stdarg, since 1.2.2 
used vsprintf().  So we just need to find a way for it to be reliably 
used.

mark





More information about the Zlib-devel mailing list