public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: Failing 'make check' for non-Cygwin GMP-ECM package
Date: Sat, 06 Feb 2016 09:32:00 -0000	[thread overview]
Message-ID: <Pine.BSF.4.63.1602060102510.92842@m0.truegem.net> (raw)

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

             reply	other threads:[~2016-02-06  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06  9:32 Mark Geisert [this message]
2016-02-06 10:05 ` Achim Gratz
2016-02-07 23:53   ` Mark Geisert
2016-02-08  7:59     ` Mark Geisert
2016-02-10 19:32       ` Failing 'make check' for non-Cygwin GMP-ECM package -- workaround Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSF.4.63.1602060102510.92842@m0.truegem.net \
    --to=mark@maxrnd.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).