[Zlib-devel] zlib 1.2.2.3 available for testing: OSF/1 4.0 Alpha failure

Nelson H. F. Beebe beebe at math.utah.edu
Mon May 30 17:43:28 EDT 2005


Mark Adler <madler at alumni.caltech.edu> responds on Mon, 30 May 2005
14:17:30 -0700 to a zlib-1.2.2.3 problem report that I posted to this
list earlier today:

>> ...
>> > That single failure was DEC Alpha OSF/1 4.0 compiled with native cc: 
>> > the zlib test died with a "Memory fault"
>> ...
>> > zlib version 1.2.2.3 = 0x1223, compile flags = 0x30000a9
>> ...
>> > signal Segmentation fault at >*[strlen, 0x3ff801a2ce0]  ldq_u   r1, 
>> > 0(r16)
>> > (dbx) where
>> >>  0 strlen(0x0, 0x0, 0x0, 0x0, 0x0) [0x3ff801a2ce0]
>> >    1 _doprnt(0x0, 0x0, 0x0, 0x0, 0x0) [0x3ff800ddcc8]
>> >    2 sprintf(0x11fffd640, 0x140002308, 0x40002310, 0x6c6c6568, 0x7fff) 
>> > [0x3ff800da08c]
>> 
>> The compile flags tell me that sprintf() returns a value, which should 
>> be the length of the resulting string.  (Those compile flags are 
>> useful!)  A strlen() being called within sprintf(), possilbly to 
>> determine that  length, never finds a terminating zero and goes 
>> charging off into la la land.  Sounds like a library bug to me.
>> 
>> > However zlib-1.2.2 and earlier passed
>> > their tests on this system with native cc, so further analysis is
>> > desirable.
>> 
>> I can see no changes between 1.2.2 and 1.2.2.3 relevant to this issue.  
>> Perhaps a different *printf function was being used.  What were the 
>> compile flags for the successful 1.2.2 test?
>> ...

For the successful 1.2.2 test, my logs have:

Machinetype:            DEC Alpha 4100-5/466 (4 CPUs, 466 MHz, 2GB RAM);          OSF/1 4.0F
Remote cc version:      DEC C V5.9-005 on Digital UNIX V4.0 (Rev. 1229)
Remote date:            2004.10.26.11.11.46
Configure environment:  CC=cc CFLAGS="-ieee -I/usr/local/include" CXX=cxx LDFLAGS="-Wl,-rpath,/usr/local/lib -Wl,-oldstyle_liblookup -L/usr/local/lib" 
Configure flags:        --shared
...
cc -ieee -I/usr/local/include -DNO_snprintf -DUSE_MMAP -o minigzip minigzip.o -L. libz.so.1.2.2
...
		*** zlib test OK ***

For the failing 1.2.2.3 test, the logs have:

Machinetype:            DEC Alpha 4100-5/466 (4 21164 EV5 CPUs, 466 MHz, 2GB RAM);          OSF/1 4.0F
Remote cc version:      DEC C V5.9-005 on Digital UNIX V4.0 (Rev. 1229)
Date:                   2005.05.28.14.07.41
Configure environment:  CC=cc CFLAGS="-ieee -I/usr/local/include" CXX=cxx CXXFLAGS="-ieee -I/usr/local/include" LDFLAGS="-Wl,-rpath,/usr/local/lib -Wl,-oldstyle_liblookup -L/usr/local/lib" FC=f77 F77=f77 
Configure flags:        
...
cc -ieee -I/usr/local/include -DNO_snprintf -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
...
hello world
/bin/sh: 3023 Memory fault		*** zlib test FAILED ***

The only difference between the two builds seems to be the --shared
configure time option.

I therefore started a fresh build of zlib-1.2.2.3, adding the --shared
option to the configure step.  Unfortunately, that too leads to
failure:

...
cc -ieee -I/usr/local/include -DNO_snprintf -DUSE_MMAP -o minigzip minigzip.o -L. libz.so.1.2.2.3
...
hello world
/bin/sh: 29545 Memory fault		*** zlib test FAILED ***

Here again is a debug trace:

% dbx example
dbx version 3.11.10
Type 'help' for help.

(dbx) run
zlib version 1.2.2.3 = 0x1223, compile flags = 0x30000a9
uncompress(): hello, hello!
signal Segmentation fault at >*[strlen, 0x3ff801a2ce0]  ldq_u   r1, 0(r16)
(dbx) where
>  0 strlen(0x0, 0x0, 0x0, 0x0, 0x0) [0x3ff801a2ce0]
   1 _doprnt(0x0, 0x0, 0x0, 0x0, 0x0) [0x3ff800ddcc8]
   2 sprintf(0x11fffd600, 0x140000788, 0x40000790, 0xffffffffc90c2086, 0xffffffffffff0888) [0x3ff800da08c]
   3 gzprintf(0x140000780, 0x140002200, 0x120001e64, 0x140002200, 0x140000780) [0x3ffbffe41e8]
   4 test_gzio(0x140000868, 0x9c40, 0xe, 0x13, 0x140004000) [0x120001ee8]
   5 main(0x14000d320, 0x9c40, 0x11fffe6c8, 0x3ff00000001, 0x140000860) [0x120003820]

For Mark's personal use, I'll post him a pointer to a tar file with
the three log files, in the hope that his sharp eye will spot
something that mine so far doesn't.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------




More information about the Zlib-devel mailing list