public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Failing 'make check' for non-Cygwin GMP-ECM package
@ 2016-02-06  9:32 Mark Geisert
  2016-02-06 10:05 ` Achim Gratz
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Geisert @ 2016-02-06  9:32 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-10 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-06  9:32 Failing 'make check' for non-Cygwin GMP-ECM package Mark Geisert
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

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).