pkgsrc/math/mpfr
wiz 53fe698af1 Apply 11 upstream patches, bump to 3.2.1pl11.
Requested by Kai-Uwe Eckhardt.
Remove an incorrect comment.

Changes:

One of the mpfr_exp implementations uses a left shift on an integer
that can be negative: exps <<= 1; and this has an undefined behavior
according to the ISO C standard. In most cases, this will correspond
to a multiplication by 2, and the code will behave as expected
(this is why the bug hadn't been detected until now). But problems
may occur if a sanitizer is used (this is how this bug was detected)
or possibly in case of advanced optimizations, such as LTO. This
is fixed by the exp_2 patch.

The mpfr_fits_u*_p functions return 0 ("doesn't fit") instead of
non-zero ("fits") on negative arguments for which the rounding to
an integer in the given rounding mode is 0. This bug is fixed by
the fits-smallneg patch, which also updates the testcases.

Some tget_flt tests fail in environments where native C floating-point
division by zero is not supported, e.g. regarded as an error, such
as with Clang's sanitizer; some similar tests were already disabled
in such a case, but not all. The tset_ld test triggers a useless
overflow on a double. These problems are fixed by the clang-divby0
patch, which also disables constant division by zero on the native
C type double with Clang in order to avoid incorrect code.

The formatted output functions (mpfr_*printf) are incorrect on the
value 0 when using the alternative form (# flag), a positive
precision, and the g or G conversion specifier: there is one
additional trailing 0. The corresponding test is also incorrect
(explaining why the bug was not detected). These problems are fixed
by the printf-alt0 patch, which also provides some additional
related tests.

Only for applications using the custom interface: The mpfr_custom_init_set
macro has a typo in a variable name, which can yield incorrect
behavior if the second argument is not a simple expression. This
bug is fixed by the custom_init_set patch.

The build fails on li2.c with the GCC -Werror=return-type option
when logging has been enabled. This problem is fixed by the li2-return
patch.

The rounding of mpfr_exp can be incorrect for output precisions
larger than or equal to MPFR_EXP_THRESHOLD (several thousands of
bits; its value depends on the architecture). This bug is fixed by
the exp3 patch, which also provides a testcase.

This MPFR release fails to build with GMP 6 when the --with-gmp-build
configure option is used. The gmp6-compat patch fixes this
compatibility problem.

When dividing a very large number (near the maximum finite one, in
absolute value) by a very small number (near the minimum one, in
absolute value), an integer overflow occurs in the computation of
the exponent of the result, yielding undefined behavior, such as
the result 0 instead of infinity. This bug is fixed by the div-overflow
patch, which also provides a testcase.

The vasprintf.c source file contains incorrect assertions, which
may fail while the computation is valid; this can occur only when
outputting tiny numbers (very small exponents). These assertions
are fixed by the vasprintf patch, which also provides a testcase.

A buffer overflow may occur in mpfr_strtofr. This is due to incorrect
GMP documentation for mpn_set_str about the size of a buffer
(discussion; first fix in the GMP documentation). This bug is
present in the MPFR versions from 2.1.0 (adding mpfr_strtofr) to
this one, and can be detected by running "make check" in a 32-bit
ABI under GNU/Linux with alloca disabled (this is currently possible
by using the --with-gmp-build configure option where alloca has
been disabled in the GMP build). It is fixed by the strtofr patch.
2014-12-05 13:16:26 +00:00
..
buildlink3.mk
builtin.mk
DESCR
distinfo Apply 11 upstream patches, bump to 3.2.1pl11. 2014-12-05 13:16:26 +00:00
inplace.mk Mark two custom targets .PHONY. 2014-12-05 13:14:21 +00:00
Makefile Apply 11 upstream patches, bump to 3.2.1pl11. 2014-12-05 13:16:26 +00:00
PLIST