Subject: bug#23133: gzip-1.7: Segmentation Fault with solarisstudio12.4 on Solaris10 x64

From: Kiyoshi KANAZAWA <[email-masked]>
Date: Mon, 28 Mar 2016 18:46:37 +0900 (JST)

Hello,

I tried to build gzip-1.7 with solarisstudio12.4 cc, on Solaris10 x64,

and had 'Segmentation Fault' in make check.

% ./configure CC=cc CFLAGS='-m64 -g'
% make
% make check
  GEN      public-submodule-commit
make  check-recursive
make[1]: Entering directory '/tmp/gzip-1.7'
Making check in lib
make[2]: Entering directory '/tmp/gzip-1.7/lib'
make  check-am
make[3]: Entering directory '/tmp/gzip-1.7/lib'
make[3]: Leaving directory '/tmp/gzip-1.7/lib'
make[2]: Leaving directory '/tmp/gzip-1.7/lib'
Making check in doc
make[2]: Entering directory '/tmp/gzip-1.7/doc'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/tmp/gzip-1.7/doc'
Making check in .
make[2]: Entering directory '/tmp/gzip-1.7'
make  check-local
make[3]: Entering directory '/tmp/gzip-1.7'
  GEN      gzip.doc.gz
/bin/bash: line 1: 22685 Segmentation Fault      (core dumped) ./gzip < ./gzip.doc > gzip.doc.gz-t
Makefile:2173: recipe for target 'gzip.doc.gz' failed
make[3]: *** [gzip.doc.gz] Error 139
make[3]: Leaving directory '/tmp/gzip-1.7'
Makefile:1985: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/tmp/gzip-1.7'
Makefile:1712: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/tmp/gzip-1.7'
Makefile:1987: recipe for target 'check' failed
make: *** [check] Error 2

% dbx gzip core
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 8.0' in your .dbxrc
Reading gzip
core file header read successfully
Reading ld.so.1
Reading librt.so.1
Reading libc.so.1
Reading libaio.so.1
Reading libmd.so.1
program terminated by signal SEGV (no mapping at the fault address)
0x0000000000428885: ldexp+0x1eb8d:      movl     0x0000000000000014(%esp),%esi
Current function is deflate
  764               match_length = longest_match (hash_head);
(dbx) where                                                                                  
  [1] 0x428885(0x6, 0x31, 0x7, 0x2529, 0xfefa, 0x7), at 0x428885 
=>[2] deflate(), line 764 in "deflate.c"
  [3] zip(in = 0, out = 1), line 80 in "zip.c"
  [4] treat_stdin(), line 775 in "gzip.c"
  [5] main(argc = 1, argv = 0xfffffd7fffdfe4d8), line 665 in "gzip.c"

After gzip dies, gzip.doc.gz-t is null (size is 0).

Best Regards,

--- Kiyoshi <[email-masked]>