delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/02/06/04:32:29

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:mime-version
:content-type; q=dns; s=default; b=PwY0YgHkA5bijj2VytSefn6jrV8A6
AaYeys+mEVt0vXyeyZBxppE4tixRDJPaFA1JE9dNwCyMfCS5YA+9NmN43e0Gzl3r
03G8UVKoJ7vfcTPdcYAQGhSTMKVZ966y19qJSzTAFeAJb+ERA/R+jMYBFs32EAbe
LZEA6beNGRrG7c=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:mime-version
:content-type; s=default; bh=1TwFR4Kfw5m6OgCAREAO9VPs240=; b=uEK
DEOMDlXUTPzOCE8TTzDeQc3IDqSjetg2QV2t/lAwPyi8HLg86NeJ1bbJixxSW+f8
qCas1fyi40Jm1FtopyxM5RQur2W0KJ9JQsHNexaiC+MikvqK9EmVdexztZAiIvTC
J8dVQqPkF1svwd11uesVG69rvktbXglAen1NdLyE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*r:8.12.11, Hx-languages-length:2209, H*F:U*mark, 4GB
X-HELO: m0.truegem.net
Date: Sat, 6 Feb 2016 01:32:03 -0800 (PST)
From: Mark Geisert <mark AT maxrnd DOT com>
To: cygwin AT cygwin DOT com
Subject: Failing 'make check' for non-Cygwin GMP-ECM package
Message-ID: <Pine.BSF.4.63.1602060102510.92842@m0.truegem.net>
MIME-Version: 1.0

I'm seeing an odd issue after building the GMP-ECM 6.4.4 package from 
Inria.  I downloaded the .tar.gz file and unpacked, ran configure, then 
make and 'make check'.  I get a SIGSEGV from a test using ecm.exe as part 
of 'make check'.

Debugging with gdb, I see something odd and would appreciate any thoughts 
on where I should take this issue.  The faulting source line is 
mpmod.c:343 which reads:
   REDC2(rp, cp, np, nn, invm);
This macro expands to a call to __gmpn_redc_2().  That function is at an 
address above the 4GB line (this is on Win7 64-bit) as seen here:

(gdb) i func ^__gmpn_redc_2$
All functions matching regular expression "^__gmpn_redc_2$":

Non-debugging symbols:
0x00000003fcbee9e8  __gmpn_redc_2

But the instructions generated for that source line look like this:
(gdb) x/7i $rip
=> 0x1004166c0 <__ecm_mpres_get_z+240>: mov    0x10(%rdi),%rax
    0x1004166c4 <__ecm_mpres_get_z+244>: mov    %rbp,%r9
    0x1004166c7 <__ecm_mpres_get_z+247>: mov    %r13,%r8
    0x1004166ca <__ecm_mpres_get_z+250>: mov    %r12,%rcx
    0x1004166cd <__ecm_mpres_get_z+253>: mov    %rax,0x20(%rsp)
    0x1004166d2 <__ecm_mpres_get_z+258>: callq  0xfcbee9e8
    0x1004166d7 <__ecm_mpres_get_z+263>: test   %rax,%rax

Notice how the callq instruction has a truncated address.  I thought maybe 
there's an issue with displaying that instruction (unlikely I know) so I 
stepped by instruction, but no, the truncated address is actually hit:
(gdb) si
0x00000001004166c4      343       REDC2(rp, cp, np, nn, invm);
(gdb)
0x00000001004166c7      343       REDC2(rp, cp, np, nn, invm);
(gdb)
0x00000001004166ca      343       REDC2(rp, cp, np, nn, invm);
(gdb)
0x00000001004166cd      343       REDC2(rp, cp, np, nn, invm);
(gdb)
0x00000001004166d2      343       REDC2(rp, cp, np, nn, invm);
(gdb)
0x00000000fcbee9e8 in ?? ()
(gdb)
Program received signal SIGSEGV, Segmentation fault.
0x00000000fcbee9e8 in ?? ()
(gdb)

I'm current on all Cygwin packages such as binutils.  Does the above look 
like a linker issue or linker misuse (e.g. missing option)?  Could there 
be a mismatch of object file arch between my just-built GMP-ECM and 
Cygwin's libgmp-devel?  Or something else?  If it doesn't seem like a 
Cygwin issue I can take it upstream to Inria.
Thanks much,

..mark

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019