glibc/sysdeps/ieee754
Zack Weinberg 4e2f43f842 Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319)
The _chk variants of all of the printf functions become much simpler.
This is the last thing that we needed _IO_acquire_lock_clear_flags2
for, so it can go as well.  I took the opportunity to make the headers
included and the names of all local variables consistent across all the
affected files.

Since we ultimately want to get rid of __no_long_double as well, it
must be possible to get all of the nontrivial effects of the _chk
functions by calling the _internal functions with appropriate flags.
For most of the __(v)xprintf_chk functions, this is covered by
PRINTF_FORTIFY plus some up-front argument checks that can be
duplicated.  However, __(v)sprintf_chk installs a custom jump table so
that it can crash instead of overflowing the output buffer.  This
functionality is moved to __vsprintf_internal, which now has a
'maxlen' argument like __vsnprintf_internal; to get the unsafe
behavior of ordinary (v)sprintf, pass -1 for that argument.

obstack_printf_chk and obstack_vprintf_chk are no longer in the same
file.

As a side-effect of the unification of both fortified and non-fortified
vdprintf initialization, this patch fixes bug 11319 for __dprintf_chk
and __vdprintf_chk, which was previously fixed only for dprintf and
vdprintf by the commit

commit 7ca890b88e
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Wed Feb 24 16:07:57 2010 -0800

    Fix reporting of I/O errors in *dprintf functions.

This patch adds a test case to avoid regressions.

Tested for powerpc and powerpc64le.
2018-12-05 18:15:43 -02:00
..
dbl-64 Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
float128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
flt-32 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-64-128 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-96 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
ldbl-128ibm Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128ibm-compat ldbl-128ibm-compat: Add printf_size 2018-07-02 10:51:01 -03:00
ldbl-opt Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
soft-fp sysdeps/ieee754/soft-fp: ignore maybe-uninitialized with -O [BZ #19444] 2018-10-02 15:40:57 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
k_standardl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00