Possible issue on windows build (mingw)

Torbjorn Granlund tg at gmplib.org
Tue Apr 3 12:25:42 CEST 2012


Thanks for helping with this debugging!

I was able to reproduce some of the failures you observed by using
static linking on our emulated windos machine.  (It remains to be
understood why a dynamic link was incorrectly "successful".)

Please apply the following patches:

1. http://gmplib.org:8000/gmp/raw-rev/1262d026cdb5
   This patch my Marco is also fixed in last night's snapshot.

2. http://gmplib.org:8000/gmp/raw-rev/5b41f5fdb823
   This patch should fix the massive failures related to the toom functions.

That gmp-mparam.h changes behaviour is to be expected.  It does not
(except theoretically) indicate invalid combinations of parameters.

  "mpn/x86_64/coreisbr/aorrlsh_n.asm" causes the following assert in many tests:
  toom_eval_pm2exp.c:112: GNU MP assertion failed: (k+1)*shift >= 64 || xp2[n] <
  ((((mp_limb_t) 1LL)<<((k+1)*shift))-1)/((((mp_limb_t) 1LL)<<shift)-1)
  
This is fixed by patch 2 above.  Please confirm.

  "mpn/x86_64/core2/gcd_1.asm" causes the following test failure:
  ERROR in test 38
  mpz_gcd returned incorrect result
  op1=18F61
  op2=7FFFFFFFFFFFFFFF...0000000000000000
  expected result:
  1
  mpz_gcd returns:
  E00000000
  FAIL: t-gcd.exe
  
Alas, I cannot reproduce this with any of my attempted builds.
I'll do some code inspection next.

  
  ERROR (test 0/6): bad mpq_get_d results
  last: 9.812762848509795e+055
   new: 1.977541358830227e+048
  1836271237341295859612898827076534101128907148541526348485562245876958304759219721269767425728676382937455401999767574284401997674306336874703759271976542771636393707130456758076162310043257458673547956492326871907229280035156650172987953389843577824495835653543183448490834064125919766846006633844362221724150772955677596467869045155756125232309954176052095888664529937906616139772001432572550085221821277350150591207364582851160959389372421780101760557192433829555143849879024884210092675890225797997320610782770304211565150023567714714424272329226110006673104984413756995350308797109509651909603362743467621999199
  /
  92856274744488974759256854913044264188778140879261886568031390253856895073438403365285464835469195303328427607734724015166019459987691867528205062944635996249580977032960568774808293864481729137607152625909510661947371257705487097773846697002488527114787103481621788401813638983122630838048005039406591222203177076134078907
  4979519555132438186177543825149534555984741631154253376452933500406069451804592836816158898355970937021755301022986670236951505605022548173483834231464935072132989143885004748169043588667107512105640309715047743018741798159064368578541192740864
  FAIL: t-get_d.exe
  
I haven't seen this (but I didn't try to reproduce this before applying
the two patches above).  Does this still happon for you?

(If you replace gmp-mparam.h, you need to recompile everything, since
else there might be inconsistencies.)

-- 
Torbjörn


More information about the gmp-bugs mailing list