summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorasau <asau>2011-05-08 21:06:51 +0000
committerasau <asau>2011-05-08 21:06:51 +0000
commit7461f0fb2eeb5c4a5e0cbb20a23a1fd30295d21a (patch)
treeeaa28af26ce056baf09cef1520221ae3b1402593 /math
parent7adc86ee8059821c0febe07998e5d99977412797 (diff)
downloadpkgsrc-7461f0fb2eeb5c4a5e0cbb20a23a1fd30295d21a.tar.gz
Update MPFR to version 3.0.1 patch level 3.
Patch 3 fixes the following bug: The mpfr_atan function calls mpfr_check_range on the unrounded result (no longer allocated) instead of the rounded result. Consequence of this bug: possible incorrect or invalid result and/or incorrect flags if the unrounded result or rounded result is not in the current exponent range. Or possibly worse if the memory used by the unrounded result is modified before the return of the function. This bug has been present since MPFR 2.1.0 (exceptions were not supported before). Patch 2 fixes the following bug: The mpfr_rec_sqrt function can have undefined behavior due to the call of mpn_add_1 or mpn_sub_1 (from GMP) with a null size, which is not allowed. The fourth argument of mpn_add_1 or mpn_sub_1 (i.e. the value that should have been added or subtracted) is here also 0, so that the consequences are limited. In practice, with the current GMP version, this yields a small buffer overflow (1 limb, i.e. 32 bits or 64 bits), as shown by valgrind, with the possible consequences: a crash, or memory corruption (very unlikely) if another process or thread modifies the limb at the same time (as in this context, the value is first read then written back by GMP). This bug has always been present since the introduction of the mpfr_rec_sqrt function in MPFR 2.4.0. Patch 1 fixes the following bug: If the exponent range has been reduced such that emax = 1 or 2, mpfr_asin may give an incorrect result on +1 and -1. which should probably never occur in practical codes.
Diffstat (limited to 'math')
-rw-r--r--math/mpfr/Makefile9
-rw-r--r--math/mpfr/distinfo11
2 files changed, 17 insertions, 3 deletions
diff --git a/math/mpfr/Makefile b/math/mpfr/Makefile
index 2b593f8e7e3..c16325d558d 100644
--- a/math/mpfr/Makefile
+++ b/math/mpfr/Makefile
@@ -1,12 +1,17 @@
-# $NetBSD: Makefile,v 1.18 2011/04/07 00:21:02 asau Exp $
+# $NetBSD: Makefile,v 1.19 2011/05/08 21:06:51 asau Exp $
#
DISTNAME= mpfr-3.0.1
+PKGNAME= ${DISTNAME}.3 # append patch level
CATEGORIES= math
-MASTER_SITES= http://www.mpfr.org/mpfr-current/
+MASTER_SITES= http://www.mpfr.org/mpfr-3.0.1/
DIST_SUBDIR= ${DISTNAME}
+PATCH_SITES= ${MASTER_SITES}
+PATCHFILES= patch01 patch02 patch03
+PATCH_DIST_STRIP= -p1
+
MAINTAINER= rh@NetBSD.org
HOMEPAGE= http://www.mpfr.org/
COMMENT= GMP-based library for multiple-precision floating-point computations
diff --git a/math/mpfr/distinfo b/math/mpfr/distinfo
index e9907cdb9e8..03011993e9a 100644
--- a/math/mpfr/distinfo
+++ b/math/mpfr/distinfo
@@ -1,5 +1,14 @@
-$NetBSD: distinfo,v 1.11 2011/04/07 00:21:02 asau Exp $
+$NetBSD: distinfo,v 1.12 2011/05/08 21:06:51 asau Exp $
SHA1 (mpfr-3.0.1/mpfr-3.0.1.tar.gz) = caa0609934c0d2ffa29bd11bfa9c05fbade130eb
RMD160 (mpfr-3.0.1/mpfr-3.0.1.tar.gz) = cff7306c13e5a858d9188450ecf0e4efcfbfcce8
Size (mpfr-3.0.1/mpfr-3.0.1.tar.gz) = 1478243 bytes
+SHA1 (mpfr-3.0.1/patch01) = 88bffb4c5588072e1e56f026b092a873e46a4bfc
+RMD160 (mpfr-3.0.1/patch01) = 0e4d56846156369de6ce3cd3984cb060cbd3720a
+Size (mpfr-3.0.1/patch01) = 3899 bytes
+SHA1 (mpfr-3.0.1/patch02) = 3a4d9617e15d1fc3ecbf5f8f945dc5e6e76abdb7
+RMD160 (mpfr-3.0.1/patch02) = 2ad3e67f5626d1ef5735121b6d5baf0a7bb4e892
+Size (mpfr-3.0.1/patch02) = 3282 bytes
+SHA1 (mpfr-3.0.1/patch03) = 60c98873696c897e406e1106e62cff02d320d1d0
+RMD160 (mpfr-3.0.1/patch03) = df4b3c54f9ef6beaa35a88198edf9c80f35e8e41
+Size (mpfr-3.0.1/patch03) = 3347 bytes