Ticket #71 (closed defect: fixed)

Opened 20 months ago

Last modified 8 weeks ago

[needs review] GMP 4.2.1 bug fixes

Reported by: wbhart Owned by: somebody
Priority: blocker Milestone: mpir-1.3
Component: component1 Version:
Keywords: Cc:

Description (last modified by dmharvey) (diff)

Brian Gladman maintained some patches to GMP 4.2.1 in his MSVC build. These have been applied to mpir.

Files affected are:

  • gmp-impl.h
  • /mpn/generic/addsub_n.c
  • /mpz/set_d.c

These were fixed in revisions 1231 and 1232.

Change History

Changed 20 months ago by dmharvey

  • description modified (diff)

fixed formatting

Changed 20 months ago by dmharvey

I have some questions about these patches.

First, the /mpz/set_d.c and gmp-impl.h patches. It appears that whatever change got made in rev1231 got unmade in rev1232. What's the deal here?

Second, the patch to addsub_n.c. It consists of several hunks that look like:

-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+#if HAVE_NATIVE_mpn_add_nc
          acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
 #else
          acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
          acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
 #endif

Why is this change necessary? Also, why has the copyright notice changed at the top of the file (adding 2006 to the list of years of FSF copyright)?

Changed 20 months ago by brg

  • owner changed from somebody to brg
  • status changed from new to assigned

These patches are (or should be) the ones listed on the  http://gmplib.org/ page under the heading "Status of the current release". But the ones that were in my MSVC build are only a subset of these patches (the ones needed for an MSVC build) so it would make sense to apply all of them for MPIR.

I would also appreciate this being done in a Unix/Linux environment because the patch program on Windows is a real pain to use so I cannot be sure that I have applied the patches that I used in the MSVC build correctly.

Changed 20 months ago by wbhart

  • summary changed from [needs review] GMP 4.2.1 bug fixes to [needs work] GMP 4.2.1 bug fixes

Changed 19 months ago by wbhart

  • owner changed from brg to somebody
  • status changed from assigned to new

Changed 18 months ago by wbhart

  • summary changed from [needs work] GMP 4.2.1 bug fixes to [needs review] GMP 4.2.1 bug fixes

I have very carefully applied all GMP issued patches through 25/08/2008.

Changed 13 months ago by wbhart

  • status changed from new to closed
  • resolution set to fixed

Changed 4 months ago by wbhart

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from mpir-0.8 to mpir-1.3

The patches to mpf/set_str.c should not have been applied as they are for GMP 4.2.4 and following, which are LGPL v3.

From mpir-1.3.0 and following we'll include a patch due to Brian Gladman, which is LGPL v2+. The LGPL v3 license text has been added to the tarballs of all the previous releases of MPIR.

There are four patches to mpf/set_str.c which are given on the GMP website. One of these patches is a patch to another patch. Thus there are three distinct issues which we need to patch, without reference to the LGPL v3 copyrighted work.

Changed 8 weeks ago by wbhart

  • status changed from reopened to closed
  • resolution set to fixed

Brian Gladman provided an LGPL v2+ version of this file, carefully modified from the original LGPL v2+ version to fix all the bugs in mpf/set_str.c without reference to the LGPL v3+ work.

Note: See TracTickets for help on using tickets.