Go to file
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
argp Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
assert
benchtests Patch to require Python 3.4 or later to build glibc. 2018-10-29 15:28:05 +00:00
bits Y2038: Add 64-bit time for all architectures 2018-10-24 22:09:34 +02:00
catgets
ChangeLog.old
conform Combine more conformtest tests into single execution of the compiler. 2018-11-22 21:21:36 +00:00
crypt Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
csu
ctype
debug Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
dirent Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
dlfcn malloc: tcache double free check 2018-11-20 13:24:09 -05:00
elf Fix _dl_profile_fixup data-dependency issue (Bug 23690) 2018-11-30 18:05:32 -02:00
gmon
gnulib
grp
gshadow
hesiod
htl
hurd Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
iconv Unconditionally call __gconv_get_path when reading iconv configuration 2018-11-05 15:45:07 +01:00
iconvdata
include Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
inet
intl
io Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
libio Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
locale Add --no-hard-links option to localedef (bug 23923) 2018-12-03 10:15:39 -05:00
localedata Add --no-hard-links option to localedef (bug 23923) 2018-12-03 10:15:39 -05:00
login
mach
malloc malloc: tcache: Validate tc_idx before checking for double-frees [BZ #23907] 2018-11-26 20:06:37 +01:00
manual Mutex: Add pthread mutex tunables 2018-12-01 08:19:20 -08:00
math Remove the error handling wrapper from pow 2018-11-21 09:58:36 +00:00
mathvec
misc Add __vsyslog_internal, with same flags as __v*printf_internal. 2018-12-05 18:15:43 -02:00
nis
nptl Mutex: Add pthread mutex tunables 2018-12-01 08:19:20 -08:00
nptl_db
nscd
nss Increase timeout of nss/tst-nss-files-hosts-multi 2018-10-09 15:57:01 +01:00
po
posix posix: Do not include testcases.h, ptestcases.h in source tree 2018-11-29 13:51:25 +01:00
pwd
resolv Add an additional test to resolv/tst-resolv-network.c 2018-11-08 13:47:34 +01:00
resource resource: Update struct rusage comments [BZ #23689] 2018-10-19 18:03:21 +02:00
rt Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
scripts Make gen-as-const.py handle '--' consistently with awk script. 2018-12-03 22:08:50 +00:00
setjmp
shadow
signal
socket
soft-fp soft-fp: Add implementation for 128 bit self-contained 2018-11-01 18:22:00 +00:00
stdio-common Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
stdlib Add __v*printf_internal with flags arguments 2018-12-05 18:15:42 -02:00
streams
string
sunrpc
support test-container: add "su" command to run test as root, add unshare hints 2018-12-04 00:03:12 -05:00
sysdeps Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
sysvipc
termios
time Y2038: make __tz_convert compatible with 64-bit-time 2018-12-05 21:01:22 +01:00
timezone Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
wcsmbs Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD. 2018-12-05 18:15:42 -02:00
wctype
.gitattributes
.gitignore
abi-tags
aclocal.m4
ChangeLog Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY (bug 11319) 2018-12-05 18:15:43 -02:00
config.h.in
config.make.in Fix ifunc support with DT_TEXTREL segments (BZ#20480) 2018-09-25 16:27:50 -03:00
configure Patch to require Python 3.4 or later to build glibc. 2018-10-29 15:28:05 +00:00
configure.ac Patch to require Python 3.4 or later to build glibc. 2018-10-29 15:28:05 +00:00
COPYING
COPYING.LIB
extra-lib.mk
gen-locales.mk
INSTALL Patch to require Python 3.4 or later to build glibc. 2018-10-29 15:28:05 +00:00
libc-abis
libof-iterator.mk
LICENSES
MAINTAINERS
Makeconfig
Makefile Stop test-in-container trying to run other-OS binaries. 2018-12-04 16:52:39 +00:00
Makefile.in
Makerules Replace gen-as-const.awk by gen-as-const.py. 2018-11-30 15:20:41 +00:00
NEWS posix: Use posix_spawn on popen 2018-11-30 18:42:05 -02:00
o-iterator.mk
README
Rules Patch to require Python 3.4 or later to build glibc. 2018-10-29 15:28:05 +00:00
shlib-versions
test-skeleton.c
version.h

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arm-*-linux-gnueabi
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see http://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at http://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.