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

Previous Next

Package: gzip;

Reported by: Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>

Date: Mon, 28 Mar 2016 09:48:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23133 in the body.
You can then email your comments to 23133 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#23133; Package gzip. (Mon, 28 Mar 2016 09:48:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Mon, 28 Mar 2016 09:48:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>
To: "bug-gzip <at> gnu.org" <bug-gzip <at> gnu.org>
Subject: gzip-1.7: Segmentation Fault with solarisstudio12.4 on Solaris10 x64
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 <yoi_no_myoujou <at> yahoo.co.jp>




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 28 Mar 2016 23:37:01 GMT) Full text and rfc822 format available.

Notification sent to Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>:
bug acknowledged by developer. (Mon, 28 Mar 2016 23:37:01 GMT) Full text and rfc822 format available.

Message #10 received at 23133-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>
Cc: 23133-done <at> debbugs.gnu.org
Subject: Re: bug#23133: gzip-1.7: Segmentation Fault with solarisstudio12.4 on
 Solaris10 x64
Date: Mon, 28 Mar 2016 16:35:52 -0700
[Message part 1 (text/plain, inline)]
On 03/28/2016 02:46 AM, Kiyoshi KANAZAWA wrote:
> 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'

Thanks for reporting that. This exposed some bugs in configure.ac and 
lib/match.c: the configuration procedure assumes that, since cc 
assembles x86 instructions successfully, the x86 code will actually work 
when called from x86-64 code. I fixed this by installing the attached patch.

Also, since -m64 affects the preprocessor output, you need to set 
CPPFLAGS and/or put the -m64 into CC instead.  Something like the 
following should work with gzip 1.7:

./configure CC='cc -m64' CFLAGS='-g' DEFS='-D NO_ASM'

(A space is required between '-D' and 'NO_ASM'.) With the patch, plain 
'./configure CC="cc -m64" CFLAGS=-g' should also work.
[0001-Port-to-Oracle-Solaris-Studio-12.4.patch (application/x-patch, attachment)]

Information forwarded to bug-gzip <at> gnu.org:
bug#23133; Package gzip. (Tue, 29 Mar 2016 02:44:01 GMT) Full text and rfc822 format available.

Message #13 received at 23133 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>
Cc: 23133 <at> debbugs.gnu.org
Subject: Re: bug#23133: gzip-1.7: Segmentation Fault with solarisstudio12.4 on
 Solaris10 x64
Date: Mon, 28 Mar 2016 19:43:02 -0700
Kiyoshi KANAZAWA wrote:

> I confirmed your patch fixed the problem.
>
> But, I had to change am__api_version in configure, such as
> 3509c3509
> < am__api_version='1.99a'
> ---
>> >am__api_version='1.15'
>
> I know it is not good to do that, but the latest release automake version is 1.15.

Yes, gzip was built with a prerelease version of the next Automake, which is a 
bit of a pain. Your workaround should be OK.

> It seems that "DEFS='-D NO_ASM'" is not needed.
> % ./configure CC='cc -m64' CFLAGS='-g'
> % make
> % make check
> also passed.

Yes, that's right, with the patch installed you don't need '-D NO_ASM'. '-D 
NO_ASM' is helpful only with gzip 1.7 and earlier.




Information forwarded to bug-gzip <at> gnu.org:
bug#23133; Package gzip. (Tue, 29 Mar 2016 05:01:02 GMT) Full text and rfc822 format available.

Message #16 received at 23133 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Kiyoshi KANAZAWA <yoi_no_myoujou <at> yahoo.co.jp>, 23133 <at> debbugs.gnu.org
Subject: Re: bug#23133: gzip-1.7: Segmentation Fault with solarisstudio12.4 on
 Solaris10 x64
Date: Mon, 28 Mar 2016 22:00:09 -0700
On Mon, Mar 28, 2016 at 7:43 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> Kiyoshi KANAZAWA wrote:
>
>> I confirmed your patch fixed the problem.

Thank you both for the report and the patch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Apr 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.