New failures related to recent developments

2012-02-28 Thread Torbjorn Granlund
Three powerpc systems report failure this morning. I suspect they would have reported failure already yesterday, if compilation hadn't failed due to a missing file... The failures seem to be for small cases, for which the code (mpz/lucnum2_ui.c) uses a dumpmp/mini-gmp generated table. I

Re: New failures related to recent developments

2012-02-28 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: I compared mpn/fib_table.c with a system that did not report any failures (but this table to was generated with mini-gmp.c). They have the same contents. I compared the output of gen-fib table 32 0, in current gmp and gmp-5.0.2. Result is identical

Re: New failures related to recent developments

2012-02-28 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: I'm not entirely sure I understand fib-gen is supposed work. luc_limit is only assigned like this, in gen-fib.c:generate, if (mpz_cmp (l, limit) 0) luc_limit = i-1; Looking at mini-gmp.c:mpz_cmp, I've spotted

Re: New failures related to recent developments

2012-02-28 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: The failing systems seem to have no working debugging environment (which I understand). Printing out the value of limit (ought to be two limbs: 0, 1) and inputs and output of the mpz_cmp call would be helpful, I think. Then we'll see which operation

Re: New failures related to recent developments

2012-02-28 Thread Torbjorn Granlund
There is a systematic problem in mini-gmp.c when MPZ_REALLOC is called when a destination variable is the same as some other (source or destination) variable. After MPZ_REALLOC, all cached pointers must be considered to be defunct. I've spotted this error in 4 functions, but I haven't made a

Re: New failures related to recent developments

2012-02-28 Thread Niels Möller
Torbjorn Granlund t...@gmplib.org writes: After MPZ_REALLOC, all cached pointers must be considered to be defunct. It seems I was only paying attention to the destination pointer. I'll go through all uses of MPZ_REALLOC. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred.

Re: New failures related to recent developments

2012-02-28 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: Torbjorn Granlund t...@gmplib.org writes: After MPZ_REALLOC, all cached pointers must be considered to be defunct. It seems I was only paying attention to the destination pointer. I'll go through all uses of MPZ_REALLOC. This is a

Re: New failures related to recent developments

2012-02-28 Thread Torbjorn Granlund
ni...@lysator.liu.se (Niels Möller) writes: Will you commit these fixes, or do you want me to do that? Please take care of any fixing. It's your baby after all. :-) I have found the same four direct MPZ_REALLOC problems when reviewing the code: mpz_abs_add, mpz_and, mpz_ior and