Files
bpfire/lfs/mpfr
Adolf Belka 8e498000ec mpfr: Update with latest bug patches
- Update version 4.2.0 from 4 bug patches to 9 bug patches
- Update of rootfile not required
- Bug fix changelog
5	The mpfr_reldiff function, which computes |b−c|/b, is buggy on special values,
         e.g. on the following (b,c) values: (+Inf,+Inf) gives ±0 instead of NaN (like
         NaN/Inf); (+0,+0) gives 1 instead of NaN (like 0/0); (+0,1) gives 1 instead of
         Inf (like 1/0). Moreover, the sign of 0 for (+Inf,+Inf) or (−Inf,−Inf) is not
         set, i.e. it is just the sign of the destination before the call; as a
	 consequence, results are not even consistent. These bugs are fixed by the
	 reldiff patch.
	Corresponding changeset in the 4.2 branch: 81e4d4427.
6	The reuse tests are incomplete: the sign of a result zero is not checked, so
	 that it can miss bugs (one of the mpfr_reldiff bugs mentioned above, in
	 particular). The tests-reuse patch adds a check of the sign of zero and
	 contains other minor improvements.
	Corresponding changeset in the 4.2 branch: e6d47b8f5.
7	The general code for the power function (mpfr_pow_general internal function) has
	 two bugs in particular cases: the first one is an incorrect computation of the
	 error bound when there has been an intermediate underflow or overflow (in such
	 a case, the computation is performed again with a rescaling, thus with an
	 additional error term, but there is a bug in the computation of this term), so
	 that the result may be rounded incorrectly (in particular, a spurious overflow
	 is possible); the second one occurs in a corner case (destination precision 1,
	 rounding to nearest, and where the rounded result assuming an unbounded
	 exponent range would be 2emin−2 and the exact result is larger than this value),
	 with the only consequence being a missing underflow exception (the underflow
	 flag is not set). These two bugs are fixed by the pow_general patch, which also
	 provides testcases.
	Note: The second bug was introduced by commit 936df8ef6 in MPFR 4.1.0 (the code
	 simplification was incorrect, and there were no associated tests in the
	 testsuite).
	Corresponding changesets in the 4.2 branch: 85bc7331c, 5fa407a6c, 9a16c173e.
8	The mpfr_compound_si function can take a huge amount of memory and time in some
	 cases (when the argument x is a large even integer and xn is represented exactly
	 in the target precision) and does not correctly detect overflows and underflows.
	 This is fixed by the compound patch, which also provides various tests.
	Corresponding changesets in the 4.2 branch: 7635c4a35, 74d86a61f, 952fb0f5c,
	 a4894f68d, 7bb748775, f5cb40571, d87459969.
9	MPFR can crash when a formatted output function is called with %.2147483648Rg in
	 the format string. For instance: mpfr_snprintf (NULL, 0, "%.2147483648Rg\n", x);
	 This is fixed by the printf_large_prec_for_g patch, which also provides
	 testcases.
	Corresponding changesets in the 4.2 branch: 686f82776, 769ad91a6.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-15 09:37:47 +00:00

81 lines
3.3 KiB
Plaintext

###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 4.2.0
THISAPP = mpfr-$(VER)
DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_BLAKE2 = dd88ae3a6a910ad8faeb791b49c3b1085de5d0d4c49c637c124bf4d9bc79fb621d0d1d69e07d0642b9b678f6d355a5830d083dfd189e1e91d0e04c970c10bd64
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/mpfr-4.2.0-cumulative-patches-1-to-9.patch
cd $(DIR_APP) && $(CONFIGURE_ARGS) ./configure \
--prefix=/usr \
--enable-thread-safe
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)