1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-05-17 18:01:13 +03:00
Mike Frysinger abb66a672f tftp.h: rework layout to work with fortification
The current tftp structure does not work when fortification is enabled.
Starting with gcc-4.5, more size checking was added to trigger these.
Older versions just didn't have enough information, so they returned -1
as the sizes.

First, the tu_stuff field is declared as 1 byte (when it's really an
arbitrary length C string), so attempting to strcpy() with it results
in crashes.  This fails with _FORTIFY_SOURCE=1.

Second, even if we change that to [0] (since gcc does not allow flexible
array members in an union), gcc is not smart enough to see that they are
two overlapping flexible arrays (tu_stuff and tu_data), so it will still
trigger an abort with _FORTIFY_SOURCE=2.  This is because it thinks that
tu_stuff is 0 bytes and tu_data comes after it.

Talking to upstream gcc, they don't seem terribly inclined to fix the
2nd issue, but even if they did, we still have plenty of 4.5 and 4.6
installs that would hit problems.

So, let's re-order with a few more anonymous structs & unions so that
the fields are laid out with a zero-length array always as the last
field.  This seems to fix things with gcc-4.6, and the tftp-hpa pkg
continues to build & work.

URL: https://bugs.launchpad.net/ubuntu/+source/tftp-hpa/+bug/691345
URL: https://bugs.archlinux.org/task/28103
URL: https://bugs.gentoo.org/357083
URL: http://gcc.gnu.org/PR52944
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-08 01:51:22 -04:00
2012-04-29 15:34:20 +02:00
2012-04-13 19:09:44 +02:00
2012-03-29 09:56:27 -06:00
2012-04-01 09:52:09 -04:00
2012-04-29 15:34:20 +02:00
2012-05-06 20:15:50 -07:00
2007-10-28 08:24:07 +00:00
2004-03-08 07:58:18 +00:00
2004-03-08 07:58:18 +00:00
2007-07-12 18:26:36 +00:00
2007-07-12 18:26:36 +00:00
2004-04-20 04:28:00 +00:00
2010-09-07 14:36:40 +02:00
2012-04-29 06:36:30 +02:00
2012-04-29 06:36:30 +02:00
2012-01-07 20:30:26 -05:00
2004-03-08 21:31:23 +00:00
2010-03-17 02:43:12 -07:00
2010-08-23 05:53:52 -07:00
2012-05-03 09:46:57 +02:00
2004-10-12 06:19:23 +00:00
2006-09-12 11:44:01 +00:00
2012-01-01 07:17:20 -05:00
2012-01-01 07:17:21 -05:00

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[34567]86-*-gnu.

When working with Linux kernels, the GNU C Library version from
version 2.4 on is intended primarily for use with Linux kernel version
2.6.0 and later.  We only support using the NPTL implementation of
pthreads, which is now the default configuration.  The library is
unlikely to build without NPTL, or to work on Linux kernels prior to
2.6.  The old LinuxThreads add-on implementation of pthreads for older
Linux kernels is no longer supported, and we are not distributing it
with this release.

All Linux kernel versions prior to 2.6.16 are known to have some bugs that
may cause some of the tests related to pthreads in "make check" to fail.
If you see such problems, please try the test suite on the most recent
Linux kernel version that you can use, before pursuing those bugs further.

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:

	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware floating point required
	powerpc64-*-linux-gnu
	s390-*-linux-gnu
	s390x-*-linux-gnu
	sh[34]-*-linux-gnu	Requires Linux 2.6.11 or newer
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

The code for other CPU configurations supported by volunteers outside of
the core glibc maintenance effort is contained in the separate `ports'
add-on.  You can find glibc-ports-VERSION distributed separately in the
same place where you got the main glibc distribution files.
Currently these configurations have code in the `ports' add-on:

	alpha*-*-linux-gnu	Requires Linux 2.6.9 or newer for NPTL
	am33*-*-linux-gnu	Not currently functional
	arm-*-linux-gnueabi	Requires Linux 2.6.16-rc1 or newer for NPTL
	hppa-*-linux-gnu	Requires Linux 2.6.9 or newer for NPTL
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	mips-*-linux-gnu	Requires Linux 2.6.12 or newer for NPTL
	mips64-*-linux-gnu	Requires Linux 2.6.12 or newer for NPTL
	powerpc-*-linux-gnu	Software floating point (--without-fp)
	tilegx-*-linux-gnu
	tilepro-*-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., 2000-2011, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.
Description
Проект GNU C Library предоставляет основные библиотеки для систем GNU и GNU/Linux, а также для многих других систем, использующих Linux в качестве ядра
Readme 378 MiB
Languages
C 76.1%
Assembly 13.4%
Pawn 3.4%
Roff 3.2%
Makefile 1.1%
Other 2.5%