diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-09 19:04:57 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-09 19:04:57 +0200 |
commit | 7bb5f8a836b916d6ebf7b6921b136e99cea2442d (patch) | |
tree | 28a7ed786dae726ad14f100e8626eee872b1ba11 /debug | |
parent | f76453c31593957fec1a99b986bfa5506618b79c (diff) | |
parent | ab30899d880f9741a409cbc0d7a28399bdac21bf (diff) |
Merge tag 'glibc-2.23' into baseline
The GNU C Library
=================
The GNU C Library version 2.23 is now available.
The GNU C Library is used as *the* C library in the GNU system and
in GNU/Linux systems, as well as many other systems that use Linux
as the kernel.
The GNU C Library is primarily designed to be a portable
and high performance C library. It follows all relevant
standards including ISO C11 and POSIX.1-2008. It is also
internationalized and has one of the most complete
internationalization interfaces known.
The GNU C Library webpage is at http://www.gnu.org/software/libc/
Packages for the 2.23 release may be downloaded from:
http://ftpmirror.gnu.org/libc/
http://ftp.gnu.org/gnu/libc/
The mirror list is at http://www.gnu.org/order/ftp.html
NEWS for version 2.23
=====================
* Unicode 8.0.0 Support: Character encoding, character type info, and
transliteration tables are all updated to Unicode 8.0.0, using new
and/or improved generator scripts contributed by Mike FABIAN (Red Hat).
These updates cause user visible changes, such as the fixes for bugs
89, 16061, and 18568.
* sched_setaffinity, pthread_setaffinity_np no longer attempt to guess the
kernel-internal CPU set size. This means that requests that change the
CPU affinity which failed before (for example, an all-ones CPU mask) will
now succeed. Applications that need to determine the effective CPU
affinities need to call sched_getaffinity or pthread_getaffinity_np after
setting it because the kernel can adjust it (and the previous size check
would not detect this in the majority of cases).
* The fts.h header can now be used with -D_FILE_OFFSET_BITS=64. With LFS
the following new symbols are used: fts64_children, fts64_close,
fts64_open, fts64_read and fts64_set.
* getaddrinfo now detects certain invalid responses on an internal netlink
socket. If such responses are received, an affected process will
terminate with an error message of "Unexpected error <number> on netlink
descriptor <number>" or "Unexpected netlink response of size <number> on
descriptor <number>". The most likely cause for these errors is a
multi-threaded application which erroneously closes and reuses the netlink
file descriptor while it is used by getaddrinfo.
* A defect in the malloc implementation, present since glibc 2.15 (2012) or
glibc 2.10 via --enable-experimental-malloc (2009), could result in the
unnecessary serialization of memory allocation requests across threads.
The defect is now corrected. Users should see a substantial increase in
the concurent throughput of allocation requests for applications which
trigger this bug. Affected applications typically create create and
destroy threads frequently. (Bug 19048 was reported and analyzed by
Ericsson.)
* There is now a --disable-timezone-tools configure option for disabling the
building and installing of the timezone related utilities (zic, zdump, and
tzselect). This is useful for people who build the timezone data and code
independent of the GNU C Library.
* The obsolete header <regexp.h> has been removed. Programs that require
this header must be updated to use <regex.h> instead.
* The obsolete functions bdflush, create_module, get_kernel_syms,
query_module and uselib are no longer available to newly linked binaries;
the header <sys/kdaemon.h> has been removed. These functions and header
were specific to systems using the Linux kernel and could not usefully be
used with the GNU C Library on systems with version 2.6 or later of the
Linux kernel.
* Optimized string, wcsmbs and memory functions for IBM z13.
Implemented by Stefan Liebler.
* Newly linked programs that define a variable called signgam will no longer
have it set by the lgamma, lgammaf and lgammal functions. Programs that
require signgam to be set by those functions must ensure that they use the
variable provided by the GNU C Library and declared in <math.h>, without
defining their own copy.
* The minimum GCC version that can be used to build this version of the GNU
C Library is GCC 4.7. Older GCC versions, and non-GNU compilers, can
still be used to compile programs using the GNU C Library.
Security related changes:
* An out-of-bounds value in a broken-out struct tm argument to strftime no
longer causes a crash. Reported by Adam Nielsen. (CVE-2015-8776)
* The LD_POINTER_GUARD environment variable can no longer be used to disable
the pointer guard feature. It is always enabled. Previously,
LD_POINTER_GUARD could be used to disable security hardening in binaries
running in privileged AT_SECURE mode. Reported by Hector Marco-Gisbert.
(CVE-2015-8777)
* An integer overflow in hcreate and hcreate_r could lead to an
out-of-bounds memory access. Reported by Szabolcs Nagy. (CVE-2015-8778)
* The catopen function no longer has unbounded stack usage. Reported by
Max. (CVE-2015-8779)
* The nan, nanf and nanl functions no longer have unbounded stack usage
depending on the length of the string passed as an argument to the
functions. Reported by Joseph Myers. (CVE-2014-9761)
* A stack-based buffer overflow was found in libresolv when invoked from
libnss_dns, allowing specially crafted DNS responses to seize control
of execution flow in the DNS client. The buffer overflow occurs in
the functions send_dg (send datagram) and send_vc (send TCP) for the
NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
family. The use of AF_UNSPEC triggers the low-level resolver code to
send out two parallel queries for A and AAAA. A mismanagement of the
buffers used for those queries could result in the response of a query
writing beyond the alloca allocated buffer created by
_nss_dns_gethostbyname4_r. Buffer management is simplified to remove
the overflow. Thanks to the Google Security Team and Red Hat for
reporting the security impact of this issue, and Robert Holiday of
Ciena for reporting the related bug 18665. (CVE-2015-7547)
The following bugs are resolved with this release:
[89] localedata: Locales nb_NO and nn_NO should transliterate æøå
[887] math: Math library function "logb" and "nextafter" inconsistent
[2542] math: Incorrect return from float gamma (-0X1.FA471547C2FE5P+1)
[2543] math: Incorrect return from float gamma (-0X1.9260DCP+1)
[2558] math: Incorrect return from double gamma (-0X1.FA471547C2FE5P+1)
[2898] libc: [improve] warning: the use of `mktemp' is dangerous, better
use `mkstemp'
[4404] localedata: German translation of "Alarm clock" is misleading
[6799] math: nextafter() and nexttoward() doen't set errno on
overflow/underflow errors
[6803] math: scalb(), scalbln(), scalbn() do not set errno on
overflow/underflow
[10432] nis: _nss_nis_setnetgrent assertion failure
[11460] libc: fts has no LFS support
[12926] network: getaddrinfo()/make_request() may spin forever
[13065] nptl: Race condition in pthread barriers
[13690] nptl: pthread_mutex_unlock potentially cause invalid access
[14341] dynamic-link: Dynamic linker crash when DT_JMPREL and DT_REL{,A}
are not contiguous
[14551] math: [ldbl-128ibm] strtold overflow handling for IBM long double
[14912] libc: Rename non-installed bits/*.h headers
[15002] libc: Avoid undefined behavior in posix_fallocate overflow check
[15367] math: Let gcc use __builtin_isinf
[15384] math: One constant fewer in ieee754/dbl-64/wordsize-64/s_finite.c
[15421] math: lgamma wrongly sets signgam for ISO C
[15470] math: [arm] On ARM llrintl() and llroundl() do not raise
FE_INVALID with argument out of range
[15491] math: [i386/x86_64] x86 nearbyint implementations wrongly clear
all exceptions
[15786] dynamic-link: ifunc resolver functions can smash function
arguments
[15918] math: Unnecessary check for equality in hypotf()
[16061] localedata: Review / update transliteration data
[16068] math: [i386/x86_64] x86 and x86_64 fesetenv exclude state they
should include
[16141] time: strptime %z offset restriction
[16171] math: drem should be alias of remainder
[16296] math: fegetround is pure?
[16347] math: [ldbl-128ibm] ldbl-128/e_lgammal_r.c may not be suitable.
[16364] libc: sleep may leave SIGCHLD blocked on sync cancellation on
GNU/Linux
[16399] math: [mips] lrint / llrint / lround / llround missing exceptions
[16415] math: Clean up ldbl-128 / ldbl-128ibm expm1l for large positive
arguments
[16422] math: [powerpc] math-float, math-double failing llrint tests with
"Exception "Inexact" set" on ppc32
[16495] localedata: nl_NL: date_fmt: shuffle year/month around
[16517] math: Missing underflow exception from tanf/tan/tanl
[16519] math: Missing underflow exception from sinhf
[16520] math: Missing underflow exception from tanhf
[16521] math: Missing underflow exception from exp2
[16620] math: [ldbl-128ibm] exp10l spurious overflows / bad directed
rounding results
[16734] stdio: fopen calls mmap to allocate its buffer
[16961] math: nan function incorrect handling of bad sequences
[16962] math: nan function unbounded stack allocation (CVE-2014-9761)
[16973] localedata: Fix lang_lib/lang_term as per ISO 639-2
[16985] locale: localedef: confusing error message when opening output
fails
[17118] math: ctanh(INFINITY + 2 * I) returns incorrect value
[17197] locale: Redundant shift character in iconv conversion output at
block boundary
[17243] libc: trunk/posix/execl.c:53: va_args problem ?
[17244] libc: trunk/sysdeps/unix/sysv/linux/semctl.c:116: va_args muxup ?
[17250] dynamic-link: static linking breaks nss loading
(getaddrinfo/getpwnam/etc...)
[17404] libc: atomic_exchange_rel lacking a barrier on MIPS16, GCC before
4.7?
[17441] math: isnan() should use __builtin_isnan() in GCC
[17514] nptl: Assert failure unlocking ERRORCHECK mutex after timedlock
(related to lock elision)
[17787] manual: Exponent on page 324 of the PDF ends prematurely
[17886] time: strptime should be able to parse "Z" as a timezone with %z
[17887] time: strptime should be able to parse "+01:00" style timezones
[17905] libc: catopen() Multiple unbounded stack allocations
(CVE-2015-8779)
[18084] libc: backtrace (..., 0) dumps core on x86
[18086] libc: nice() sets errno to 0 on success
[18240] libc: hcreate, hcreate_r should fail with ENOMEM if element count
is too large (CVE-2015-8778)
[18251] dynamic-link: SONAME missing when audit modules provides path
[18265] libc: add attributes for wchar string and memory functions
[18370] math: csqrt missing underflows
[18421] libc: [hppa] read-only segment has dynamic relocations
[18472] libc: Obsolete syscall wrappers should be compat symbols
[18480] libc: hppa glibc miscompilation in sched_setaffinity()
[18491] localedata: Update tr_TR LC_CTYPE as part of Unicode updates
[18525] localedata: Remove locale timezone information
[18560] libc: [powerpc] spurious bits/ipc.h definitions
[18568] localedata: Update locale data to Unicode 8.0
[18589] locale: sort-test.sh fails at random
[18595] math: ctan, ctanh missing underflows
[18604] libc: assert macro-expands its argument
[18610] math: S390: fetestexcept() reports any exception if DXC-code
contains a vector instruction exception.
[18611] math: j1, jn missing errno setting on underflow
[18618] localedata: sync Chechen locale definitions with other *_RU
locales
[18647] math: powf(-0x1.000002p0, 0x1p30) returns 0 instead of +inf
[18661] libc: Some x86-64 assembly codes don't align stack to 16 bytes
[18665] network: In send_dg, the recvfrom function is NOT always using the
buffer size of a newly created buffer (CVE-2015-7547)
[18674] libc: [i386] trunk/sysdeps/i386/tst-auditmod3b.c:84: possible
missing break ?
[18675] libc: fpathconf(_PC_NAME_MAX) fails against large filesystems for
32bit processes
[18681] libc: regexp.h is obsolete and buggy, and should be desupported
[18699] math: tilegx cproj() for various complex infinities does not yield
infinity
[18724] libc: Harden put*ent functions against data injection
[18743] nptl: PowerPC: findutils testcase fails with --enable-lock-elision
[18755] build: build errors with -DNDEBUG
[18757] stdio: fmemopen fails to set errno on failure
[18778] dynamic-link: ld.so crashes if failed dlopen causes libpthread to
be forced unloaded
[18781] libc: openat64 lacks O_LARGEFILE
[18787] libc: [hppa] sysdeps/unix/sysv/linux/hppa/bits/atomic.h:71:6:
error: can’t find a register in class ‘R1_REGS’ while reloading ‘asm’
[18789] math: [ldbl-128ibm] sinhl inaccurate near 0
[18790] math: [ldbl-128ibm] tanhl inaccurate
[18795] libc: stpncpy fortification misses buffer lengths that are
statically too large
[18796] build: build fails for --disable-mathvec
[18803] math: hypot missing underflows
[18820] stdio: fmemopen may leak memory on failure
[18823] math: csqrt spurious underflows
[18824] math: fma spurious underflows
[18825] math: pow missing underflows
[18857] math: [ldbl-128ibm] nearbyintl wrongly uses signaling comparisons
[18868] nptl: pthread_barrier_init typo has in-theory-undefined behavior
[18870] build: sem_open.c fails to compile with missing symbol
FUTEX_SHARED
[18872] stdio: Fix memory leak in printf_positional
[18873] libc: posix_fallocate overflow check ineffective
[18875] math: Excess precision leads incorrect libm
[18877] libc: arm: mmap offset regression
[18887] libc: memory corruption when using getmntent on blank lines
[18918] localedata: hu_HU: change time to HH:MM:SS format
[18921] libc: Regression: extraneous stat() and fstat() performed by
opendir()
[18928] dynamic-link: LD_POINTER_GUARD is not ignored for privileged
binaries (CVE-2015-8777)
[18951] math: tgamma missing underflows
[18952] math: [ldbl-128/ldbl-128ibm] lgammal spurious "invalid", incorrect
signgam
[18953] localedata: lt_LT: change currency symbol to the euro
[18956] math: powf inaccuracy
[18961] math: [i386] exp missing underflows
[18966] math: [i386] exp10 missing underflows
[18967] math: math.h XSI POSIX namespace (gamma, isnan, scalb)
[18969] build: multiple string test failures due to missing locale
dependencies
[18970] libc: Reference of pthread_setcancelstate in libc.a
[18977] math: float / long double Bessel functions not in XSI POSIX
[18980] math: i386 libm functions return with excess range and precision
[18981] math: i386 scalb*, ldexp return with excess range and precision
[18982] stdio: va_list and vprintf
[18985] time: Passing out of range data to strftime() causes a segfault
(CVE-2015-8776)
[19003] math: [x86_64] fma4 version of pow inappropriate contraction
[19007] libc: FAIL: elf/check-localplt with -z now and binutils 2.26
[19012] locale: iconv_open leaks memory on error path
[19016] math: clog, clog10 inaccuracy
[19018] nptl: Mangle function pointers in tls_dtor_list
[19032] math: [i386] acosh (-qNaN) spurious "invalid" exception
[19046] math: ldbl-128 / ldbl-128ibm lgamma bad overflow handling
[19048] malloc: malloc: arena free list can become cyclic, increasing
contention
[19049] math: [powerpc] erfc incorrect zero sign
[19050] math: [powerpc] log* incorrect zero sign
[19058] math: [x86_64] Link fail with -fopenmp and -flto
[19059] math: nexttoward overflow incorrect in non-default rounding modes
[19071] math: ldbl-96 lroundl incorrect just below powers of 2
[19074] network: Data race in _res_hconf_reorder_addrs
[19076] math: [ldbl-128ibm] log1pl (-1) wrong sign of infinity
[19077] math: [ldbl-128ibm] logl (1) incorrect sign of zero result
[19078] math: [ldbl-128ibm] expl overflow incorrect in non-default
rounding modes
[19079] math: dbl-64/wordsize-64 lround based on llround incorrect for
ILP32
[19085] math: ldbl-128 lrintl, lroundl missing exceptions for 32-bit long
[19086] manual: posix_fallocate64 documented argument order is wrong.
[19088] math: lround, llround missing exceptions close to overflow
threshold
[19094] math: lrint, llrint missing exceptions close to overflow threshold
[19095] math: dbl-64 lrint incorrect for 64-bit long
[19122] dynamic-link: Unnecessary PLT relocations in librtld.os
[19124] dynamic-link: ld.so failed to build with older assmebler
[19125] math: [powerpc32] llroundf, llround incorrect exceptions
[19129] dynamic-link: [arm] Concurrent lazy TLSDESC resolution can crash
[19134] math: [powerpc32] lround, lroundf spurious exceptions
[19137] libc: i386/epoll_pwait.S doesn't support cancellation
[19143] nptl: Remove CPU set size checking from sched_setaffinity,
pthread_setaffinity_np
[19156] math: [ldbl-128] j0l spurious underflows
[19164] nptl: tst-getcpu fails with many possible CPUs
[19168] math: math/test-ildoubl and math/test-ldouble failure
[19174] nptl: PowerPC: TLE enabled pthread mutex performs poorly.
[19178] dynamic-link: ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA confuses
prelink
[19181] math: [i386/x86_64] fesetenv (FE_DFL_ENV), fesetenv
(FE_NOMASK_ENV) do not clear SSE exceptions
[19182] malloc: malloc deadlock between ptmalloc_lock_all and
_int_new_arena/reused_arena
[19189] math: [ldbl-128] log1pl (-qNaN) spurious "invalid" exception
[19201] math: dbl-64 remainder incorrect sign of zero result
[19205] math: bits/math-finite.h conditions do not match math.h and
bits/mathcalls.h
[19209] math: bits/math-finite.h wrongly maps ldexp to scalbn
[19211] math: lgamma functions do not set signgam for -ffinite-math-only
for C99-based standards
[19212] libc: features.h not -Wundef clean
[19213] math: [i386/x86_64] log* (1) incorrect zero sign for -ffinite-
math-only
[19214] libc: Family and model identification for AMD CPU's are incorrect.
[19219] libc: GLIBC build fails for ia64 with missing __nearbyintl
[19228] math: [powerpc] nearbyint wrongly clears "inexact", leaves traps
disabled
[19235] math: [powerpc64] lround, lroundf, llround, llroundf spurious
"inexact" exceptions
[19238] math: [powerpc] round, roundf spurious "inexact" for integer
arguments
[19242] libc: strtol incorrect in Turkish locales
[19243] malloc: reused_arena can pick an arena on the free list, leading
to an assertion failure and reference count corruption
[19253] time: tzset() ineffective when temporary TZ did not include DST
rules
[19266] math: strtod ("NAN(I)") incorrect in Turkish locales
[19270] math: [hppa] Shared libm missing __isnanl
[19285] libc: [hppa] sysdeps/unix/sysv/linux/hppa/bits/mman.h: missing
MAP_HUGETLB and MAP_STACK defines
[19313] nptl: Wrong __cpu_mask for x32
[19347] libc: grantpt: try to force a specific gid even without pt_chown
[19349] math: [ldbl-128ibm] tanhl inaccurate for small arguments
[19350] math: [ldbl-128ibm] sinhl spurious overflows
[19351] math: [ldbl-128ibm] logl inaccurate near 1
[19363] time: x32: times() return value wrongly truncates/sign extends
from 32bit
[19367] dynamic-link: Improve branch prediction on Silvermont
[19369] network: Default domain name not reset by res_ninit when "search"
/ "domain" entry is removed from resolv.conf
[19375] math: powerpc: incorrect results for POWER7 logb with negative
subnormals
[19385] localedata: bg_BG: time separator should be colon, not comma
[19408] libc: linux personality syscall wrapper may erroneously return an
error on 32-bit architectures
[19415] libc: dladdr returns wrong names on hppa
[19432] libc: iconv rejects redundant escape sequences in IBM900, IBM903,
IBM905, IBM907, and IBM909
[19439] math: Unix98 isinf and isnan functions conflict with C++11
[19443] build: build failures with -DDEBUG
[19451] build: Make check fails on test-double-vlen2
[19462] libc: Glibc failed to build with -Os
[19465] math: Wrong code with -Os
[19466] time: time/tst-mktime2.c is compiled into an infinite loop with
-Os
[19467] string: Fast_Unaligned_Load needs to be enabled for Excavator core
CPU's.
[19475] libc: Glibc 2.22 doesn't build on sparc [PATCH]
[19486] math: S390: Math tests fail with "Exception Inexact set".
[19529] libc: [ARM]: FAIL: stdlib/tst-makecontext
[19550] libc: [mips] mmap negative offset handling inconsistent with other
architectures
[19590] math: Fail to build shared objects that use libmvec.so functions.
Contributors
============
This release was made possible by the contributions of many people.
The maintainers are grateful to everyone who has contributed
changes or bug reports. These include:
Adhemerval Zanella
Alan Modra
Amit Pawar
Andreas Schwab
Andrew Bennett
Andrew Senkevich
Andrew Stubbs
Anton Blanchard
Arjun Shankar
Arslanbek Astemirov
Aurelien Jarno
Brett Neumeier
Carlos Eduardo Seo
Carlos O'Donell
Chris Metcalf
Chung-Lin Tang
Damyan Ivanov
Daniel Marjamäki
David Kastrup
David Lamparter
David S. Miller
Dmitry V. Levin
Egmont Koblinger
Evert
Flavio Cruz
Florian Weimer
Gabriel F. T. Gomes
Geoffrey Thomas
Gleb Fotengauer-Malinovskiy
Gunnar Hjalmarsson
H.J. Lu
Helge Deller
James Perkins
John David Anglin
Joseph Myers
Justus Winter
Khem Raj
Ludovic Courtès
Maciej W. Rozycki
Manolis Ragkousis
Marcin Kościelnicki
Mark Wielaard
Marko Myllynen
Martin Sebor
Maxim Ostapenko
Mike FABIAN
Mike Frysinger
Namhyung Kim
Ondrej Bilka
Ondřej Bílka
Paul E. Murphy
Paul Eggert
Paul Murphy
Paul Pluzhnikov
Petar Jovanovic
Phil Blundell
Rajalakshmi Srinivasaraghavan
Rasmus Villemoes
Richard Henderson
Rob Wu
Roland McGrath
Samuel Thibault
Siddhesh Poyarekar
Stan Shebs
Stefan Liebler
Steve Ellcey
Szabolcs Nagy
Thomas Schwinge
Torvald Riegel
Tulio Magno Quites Machado Filho
Vincent Bernat
Wilco Dijkstra
Zack Weinberg
Diffstat (limited to 'debug')
100 files changed, 321 insertions, 248 deletions
diff --git a/debug/Makefile b/debug/Makefile index 9ff357b6a8..6b5f31e4f6 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2015 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -60,25 +60,25 @@ CFLAGS-vsnprintf_chk.c = $(libio-mtsafe) CFLAGS-asprintf_chk.c = $(libio-mtsafe) CFLAGS-vasprintf_chk.c = $(libio-mtsafe) CFLAGS-obprintf_chk.c = $(libio-mtsafe) -CFLAGS-dprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-vdprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-printf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-vprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-vfprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-gets_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fgets_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fgets_u_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fread_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fread_u_chk.c = $(libio-mtsafe) $(exceptions) +CFLAGS-dprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-vdprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-printf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-vprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-vfprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-gets_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fgets_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fgets_u_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fread_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fread_u_chk.c = $(libio-mtsafe) -fexceptions CFLAGS-swprintf_chk.c = $(libio-mtsafe) CFLAGS-vswprintf_chk.c = $(libio-mtsafe) -CFLAGS-wprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fwprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-vwprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-vfwprintf_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fgetws_chk.c = $(libio-mtsafe) $(exceptions) -CFLAGS-fgetws_u_chk.c = $(libio-mtsafe) $(exceptions) +CFLAGS-wprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fwprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-vwprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-vfwprintf_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fgetws_chk.c = $(libio-mtsafe) -fexceptions +CFLAGS-fgetws_u_chk.c = $(libio-mtsafe) -fexceptions CFLAGS-read_chk.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables @@ -162,6 +162,13 @@ generated += catchsegv xtrace include ../Rules +ifeq ($(run-built-tests),yes) +LOCALES := de_DE.UTF-8 +include ../gen-locales.mk + +$(objpfx)tst-chk1.out: $(gen-locales) +endif + sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') $(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \ diff --git a/debug/asprintf_chk.c b/debug/asprintf_chk.c index 61daba5baf..4e0bf7912f 100644 --- a/debug/asprintf_chk.c +++ b/debug/asprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/backtrace.c b/debug/backtrace.c index 062f698370..c01b9585c7 100644 --- a/debug/backtrace.c +++ b/debug/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. Generic version. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -58,9 +58,7 @@ #endif int -__backtrace (array, size) - void **array; - int size; +__backtrace (void **array, int size) { struct layout *current; void *top_frame; diff --git a/debug/backtracesyms.c b/debug/backtracesyms.c index 2c7305c81b..ff587ee9a6 100644 --- a/debug/backtracesyms.c +++ b/debug/backtracesyms.c @@ -1,5 +1,5 @@ /* Return list with names for address in backtrace. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -34,9 +34,7 @@ char ** -__backtrace_symbols (array, size) - void *const *array; - int size; +__backtrace_symbols (void *const *array, int size) { Dl_info info[size]; int status[size]; diff --git a/debug/backtracesymsfd.c b/debug/backtracesymsfd.c index c554dfe9be..9c58f80745 100644 --- a/debug/backtracesymsfd.c +++ b/debug/backtracesymsfd.c @@ -1,5 +1,5 @@ /* Write formatted list with names for addresses in backtrace to a file. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -33,10 +33,7 @@ void -__backtrace_symbols_fd (array, size, fd) - void *const *array; - int size; - int fd; +__backtrace_symbols_fd (void *const *array, int size, int fd) { struct iovec iov[9]; int cnt; diff --git a/debug/catchsegv.sh b/debug/catchsegv.sh index bd835176d9..3c788d2125 100755 --- a/debug/catchsegv.sh +++ b/debug/catchsegv.sh @@ -1,5 +1,5 @@ -#! /bin/sh -# Copyright (C) 1998-2015 Free Software Foundation, Inc. +#!/bin/sh +# Copyright (C) 1998-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -40,7 +40,7 @@ EOF ;; --v | --ve | --ver | --vers | --versi | --versio | --version) echo 'catchsegv @PKGVERSION@@VERSION@' - echo 'Copyright (C) 2015 Free Software Foundation, Inc. + echo 'Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper.' diff --git a/debug/chk_fail.c b/debug/chk_fail.c index 28206e32b2..de5a833f40 100644 --- a/debug/chk_fail.c +++ b/debug/chk_fail.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/confstr_chk.c b/debug/confstr_chk.c index 6a4ff7a7f8..bfe7d14487 100644 --- a/debug/confstr_chk.c +++ b/debug/confstr_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@readhat.com>, 20055. diff --git a/debug/dprintf_chk.c b/debug/dprintf_chk.c index 14ee3ebff2..750b981d8b 100644 --- a/debug/dprintf_chk.c +++ b/debug/dprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/execinfo.h b/debug/execinfo.h index 7b6f5ec8d0..d47c9e69f5 100644 --- a/debug/execinfo.h +++ b/debug/execinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2015 Free Software Foundation, Inc. +/* Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fdelt_chk.c b/debug/fdelt_chk.c index bea4e01468..7fe243d217 100644 --- a/debug/fdelt_chk.c +++ b/debug/fdelt_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2015 Free Software Foundation, Inc. +/* Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fgets_chk.c b/debug/fgets_chk.c index 10aaf48cc1..6d396f9bea 100644 --- a/debug/fgets_chk.c +++ b/debug/fgets_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,11 +29,7 @@ #include <sys/param.h> char * -__fgets_chk (buf, size, n, fp) - char *buf; - size_t size; - int n; - _IO_FILE *fp; +__fgets_chk (char *buf, size_t size, int n, _IO_FILE *fp) { _IO_size_t count; char *result; diff --git a/debug/fgets_u_chk.c b/debug/fgets_u_chk.c index 2480964260..99766fe354 100644 --- a/debug/fgets_u_chk.c +++ b/debug/fgets_u_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -29,11 +29,7 @@ #include <sys/param.h> char * -__fgets_unlocked_chk (buf, size, n, fp) - char *buf; - size_t size; - int n; - _IO_FILE *fp; +__fgets_unlocked_chk (char *buf, size_t size, int n, _IO_FILE *fp) { _IO_size_t count; char *result; diff --git a/debug/fgetws_chk.c b/debug/fgetws_chk.c index 3da9f388a4..a3b7b82459 100644 --- a/debug/fgetws_chk.c +++ b/debug/fgetws_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fgetws_u_chk.c b/debug/fgetws_u_chk.c index 5f2817992b..caa568cc52 100644 --- a/debug/fgetws_u_chk.c +++ b/debug/fgetws_u_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fortify_fail.c b/debug/fortify_fail.c index f992695d14..71980779bc 100644 --- a/debug/fortify_fail.c +++ b/debug/fortify_fail.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. +/* Copyright (C) 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,9 +22,8 @@ extern char **__libc_argv attribute_hidden; void -__attribute__ ((noreturn)) -__fortify_fail (msg) - const char *msg; +__attribute__ ((noreturn)) internal_function +__fortify_fail (const char *msg) { /* The loop is added only to keep gcc happy. */ while (1) diff --git a/debug/fprintf_chk.c b/debug/fprintf_chk.c index b99988b0ee..0dd9ad6b60 100644 --- a/debug/fprintf_chk.c +++ b/debug/fprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fread_chk.c b/debug/fread_chk.c index 8815ff3591..ee88d37055 100644 --- a/debug/fread_chk.c +++ b/debug/fread_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fread_u_chk.c b/debug/fread_u_chk.c index 0987a52a0b..1b2dbd4ae5 100644 --- a/debug/fread_u_chk.c +++ b/debug/fread_u_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/fwprintf_chk.c b/debug/fwprintf_chk.c index 8701637241..1318492c53 100644 --- a/debug/fwprintf_chk.c +++ b/debug/fwprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/getcwd_chk.c b/debug/getcwd_chk.c index de87862098..7451f1af17 100644 --- a/debug/getcwd_chk.c +++ b/debug/getcwd_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/getdomainname_chk.c b/debug/getdomainname_chk.c index 7a4dba9084..cc9afda052 100644 --- a/debug/getdomainname_chk.c +++ b/debug/getdomainname_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/getgroups_chk.c b/debug/getgroups_chk.c index a208f7f262..e5c4bac767 100644 --- a/debug/getgroups_chk.c +++ b/debug/getgroups_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/gethostname_chk.c b/debug/gethostname_chk.c index 5d4863911e..7ef34753c1 100644 --- a/debug/gethostname_chk.c +++ b/debug/gethostname_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/gets_chk.c b/debug/gets_chk.c index ce1d2a5a43..aebc9eb705 100644 --- a/debug/gets_chk.c +++ b/debug/gets_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/getwd_chk.c b/debug/getwd_chk.c index d9a6605f4b..809b54dbd6 100644 --- a/debug/getwd_chk.c +++ b/debug/getwd_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/longjmp_chk.c b/debug/longjmp_chk.c index f7d1805efa..4accb4c978 100644 --- a/debug/longjmp_chk.c +++ b/debug/longjmp_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2015 Free Software Foundation, Inc. +/* Copyright (C) 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/mbsnrtowcs_chk.c b/debug/mbsnrtowcs_chk.c index 32ce6d2896..3b14f3ab9d 100644 --- a/debug/mbsnrtowcs_chk.c +++ b/debug/mbsnrtowcs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/mbsrtowcs_chk.c b/debug/mbsrtowcs_chk.c index e283da0634..b10ba195cd 100644 --- a/debug/mbsrtowcs_chk.c +++ b/debug/mbsrtowcs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/mbstowcs_chk.c b/debug/mbstowcs_chk.c index 513e53f6db..ee75aaef3c 100644 --- a/debug/mbstowcs_chk.c +++ b/debug/mbstowcs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/memcpy_chk.c b/debug/memcpy_chk.c index b240bf560f..04a1337099 100644 --- a/debug/memcpy_chk.c +++ b/debug/memcpy_chk.c @@ -1,6 +1,6 @@ /* Copy memory to memory until the specified number of bytes has been copied with error checking. Overlap is NOT handled correctly. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -22,11 +22,7 @@ #include <memcopy.h> void * -__memcpy_chk (dstpp, srcpp, len, dstlen) - void *dstpp; - const void *srcpp; - size_t len; - size_t dstlen; +__memcpy_chk (void *dstpp, const void *srcpp, size_t len, size_t dstlen) { if (__glibc_unlikely (dstlen < len)) __chk_fail (); diff --git a/debug/memmove_chk.c b/debug/memmove_chk.c index 3cd9e0b962..8e61c8ef6e 100644 --- a/debug/memmove_chk.c +++ b/debug/memmove_chk.c @@ -1,6 +1,6 @@ /* Copy memory to memory until the specified number of bytes has been copied with error checking. Overlap is handled correctly. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -26,11 +26,7 @@ #endif void * -MEMMOVE_CHK (dest, src, len, destlen) - void *dest; - const void *src; - size_t len; - size_t destlen; +MEMMOVE_CHK (void *dest, const void *src, size_t len, size_t destlen) { if (__glibc_unlikely (destlen < len)) __chk_fail (); diff --git a/debug/mempcpy_chk.c b/debug/mempcpy_chk.c index 00a242ac47..0dc1ab6489 100644 --- a/debug/mempcpy_chk.c +++ b/debug/mempcpy_chk.c @@ -1,7 +1,7 @@ /* Copy memory to memory until the specified number of bytes has been copied, return pointer to following byte, with error checking. Overlap is NOT handled correctly. - Copyright (C) 1991-2015 Free Software Foundation, Inc. + Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -23,11 +23,7 @@ #include <memcopy.h> void * -__mempcpy_chk (dstpp, srcpp, len, dstlen) - void *dstpp; - const void *srcpp; - size_t len; - size_t dstlen; +__mempcpy_chk (void *dstpp, const void *srcpp, size_t len, size_t dstlen) { if (__glibc_unlikely (dstlen < len)) __chk_fail (); diff --git a/debug/memset_chk.c b/debug/memset_chk.c index 293172f920..ef437eff73 100644 --- a/debug/memset_chk.c +++ b/debug/memset_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,11 +19,7 @@ #include <memcopy.h> void * -__memset_chk (dstpp, c, len, dstlen) - void *dstpp; - int c; - size_t len; - size_t dstlen; +__memset_chk (void *dstpp, int c, size_t len, size_t dstlen) { if (__glibc_unlikely (dstlen < len)) __chk_fail (); diff --git a/debug/noophooks.c b/debug/noophooks.c index 5f5c3642a8..e9a7fbc883 100644 --- a/debug/noophooks.c +++ b/debug/noophooks.c @@ -1,5 +1,5 @@ /* Noop hooks for the instrumenting functions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. diff --git a/debug/obprintf_chk.c b/debug/obprintf_chk.c index c49d1e9cd8..8469b5f675 100644 --- a/debug/obprintf_chk.c +++ b/debug/obprintf_chk.c @@ -1,5 +1,5 @@ /* Print output of stream to given obstack. - Copyright (C) 1996-2015 Free Software Foundation, Inc. + Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/debug/pcprofile.c b/debug/pcprofile.c index a81eb1a94a..5112e2b74f 100644 --- a/debug/pcprofile.c +++ b/debug/pcprofile.c @@ -1,5 +1,5 @@ /* Profile PC and write result to FIFO. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. diff --git a/debug/pcprofiledump.c b/debug/pcprofiledump.c index b6954a71cd..2bee597d68 100644 --- a/debug/pcprofiledump.c +++ b/debug/pcprofiledump.c @@ -1,5 +1,5 @@ /* Dump information generated by PC profiling. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -226,6 +226,6 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2015"); +"), "2016"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff --git a/debug/poll_chk.c b/debug/poll_chk.c index 214cd944ee..395451b8ec 100644 --- a/debug/poll_chk.c +++ b/debug/poll_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2015 Free Software Foundation, Inc. +/* Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/ppoll_chk.c b/debug/ppoll_chk.c index 0a82a08274..7b6e6b6fb0 100644 --- a/debug/ppoll_chk.c +++ b/debug/ppoll_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2015 Free Software Foundation, Inc. +/* Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/pread64_chk.c b/debug/pread64_chk.c index 51d41f25ce..972c1354a8 100644 --- a/debug/pread64_chk.c +++ b/debug/pread64_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/pread_chk.c b/debug/pread_chk.c index 748bea7efc..8afb9db649 100644 --- a/debug/pread_chk.c +++ b/debug/pread_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/printf_chk.c b/debug/printf_chk.c index a6b9dcbfa0..1df2389325 100644 --- a/debug/printf_chk.c +++ b/debug/printf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/read_chk.c b/debug/read_chk.c index 10bda83e67..eee40d8b39 100644 --- a/debug/read_chk.c +++ b/debug/read_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/readlink_chk.c b/debug/readlink_chk.c index 267f4b5f7b..2573025a25 100644 --- a/debug/readlink_chk.c +++ b/debug/readlink_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/readlinkat_chk.c b/debug/readlinkat_chk.c index c53987cefc..eb7448d474 100644 --- a/debug/readlinkat_chk.c +++ b/debug/readlinkat_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2015 Free Software Foundation, Inc. +/* Copyright (C) 2006-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/readonly-area.c b/debug/readonly-area.c index eab1ae4319..93d3e1eacd 100644 --- a/debug/readonly-area.c +++ b/debug/readonly-area.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/realpath_chk.c b/debug/realpath_chk.c index 2998ed3352..aed49ee855 100644 --- a/debug/realpath_chk.c +++ b/debug/realpath_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/recv_chk.c b/debug/recv_chk.c index 59d93c8d42..6c05a246f4 100644 --- a/debug/recv_chk.c +++ b/debug/recv_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/recvfrom_chk.c b/debug/recvfrom_chk.c index 95e8a30aa0..26d418b419 100644 --- a/debug/recvfrom_chk.c +++ b/debug/recvfrom_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/segfault.c b/debug/segfault.c index 3459a2aebe..4f28b331d9 100644 --- a/debug/segfault.c +++ b/debug/segfault.c @@ -1,5 +1,5 @@ /* Catch segmentation faults and print backtrace. - Copyright (C) 1998-2015 Free Software Foundation, Inc. + Copyright (C) 1998-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/debug/snprintf_chk.c b/debug/snprintf_chk.c index 86b0375a01..6948c334de 100644 --- a/debug/snprintf_chk.c +++ b/debug/snprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/sprintf_chk.c b/debug/sprintf_chk.c index b2c4c7368e..34cb8a342f 100644 --- a/debug/sprintf_chk.c +++ b/debug/sprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/stack_chk_fail.c b/debug/stack_chk_fail.c index 0e262d6e5c..4d0796f78c 100644 --- a/debug/stack_chk_fail.c +++ b/debug/stack_chk_fail.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/stack_chk_fail_local.c b/debug/stack_chk_fail_local.c index 36ddd63ced..8c469d3aa4 100644 --- a/debug/stack_chk_fail_local.c +++ b/debug/stack_chk_fail_local.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/stpcpy_chk.c b/debug/stpcpy_chk.c index 91c50316ec..7cc4a21516 100644 --- a/debug/stpcpy_chk.c +++ b/debug/stpcpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,21 +24,11 @@ /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * -__stpcpy_chk (dest, src, destlen) - char *dest; - const char *src; - size_t destlen; +__stpcpy_chk (char *dest, const char *src, size_t destlen) { - char *d = dest; - const char *s = src; - - do - { - if (__glibc_unlikely (destlen-- == 0)) - __chk_fail (); - *d++ = *s; - } - while (*s++ != '\0'); - - return d - 1; + size_t len = strlen (src); + if (len >= destlen) + __chk_fail (); + + return memcpy (dest, src, len + 1) + len; } diff --git a/debug/stpncpy_chk.c b/debug/stpncpy_chk.c index b780f5ce90..bcc14d3ed2 100644 --- a/debug/stpncpy_chk.c +++ b/debug/stpncpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2015 Free Software Foundation, Inc. +/* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/strcat_chk.c b/debug/strcat_chk.c index 8d7359faca..518bf0949f 100644 --- a/debug/strcat_chk.c +++ b/debug/strcat_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,10 +21,7 @@ /* Append SRC on the end of DEST. */ char * -__strcat_chk (dest, src, destlen) - char *dest; - const char *src; - size_t destlen; +__strcat_chk (char *dest, const char *src, size_t destlen) { char *s1 = dest; const char *s2 = src; diff --git a/debug/strcpy_chk.c b/debug/strcpy_chk.c index 91bf0dd776..5173de8864 100644 --- a/debug/strcpy_chk.c +++ b/debug/strcpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,45 +23,11 @@ /* Copy SRC to DEST with checking of destination buffer overflow. */ char * -__strcpy_chk (dest, src, destlen) - char *dest; - const char *src; - size_t destlen; +__strcpy_chk (char *dest, const char *src, size_t destlen) { - char c; - char *s = (char *) src; - const ptrdiff_t off = dest - s; + size_t len = strlen (src); + if (len >= destlen) + __chk_fail (); - while (__builtin_expect (destlen >= 4, 0)) - { - c = s[0]; - s[off] = c; - if (c == '\0') - return dest; - c = s[1]; - s[off + 1] = c; - if (c == '\0') - return dest; - c = s[2]; - s[off + 2] = c; - if (c == '\0') - return dest; - c = s[3]; - s[off + 3] = c; - if (c == '\0') - return dest; - destlen -= 4; - s += 4; - } - - do - { - if (__glibc_unlikely (destlen-- == 0)) - __chk_fail (); - c = *s; - *(s++ + off) = c; - } - while (c != '\0'); - - return dest; + return memcpy (dest, src, len + 1); } diff --git a/debug/strncat_chk.c b/debug/strncat_chk.c index 2951d05f68..8132b2c923 100644 --- a/debug/strncat_chk.c +++ b/debug/strncat_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,11 +21,7 @@ char * -__strncat_chk (s1, s2, n, s1len) - char *s1; - const char *s2; - size_t n; - size_t s1len; +__strncat_chk (char *s1, const char *s2, size_t n, size_t s1len) { char c; char *s = s1; diff --git a/debug/strncpy_chk.c b/debug/strncpy_chk.c index 98e703da5e..9452356122 100644 --- a/debug/strncpy_chk.c +++ b/debug/strncpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,11 +20,7 @@ char * -__strncpy_chk (s1, s2, n, s1len) - char *s1; - const char *s2; - size_t n; - size_t s1len; +__strncpy_chk (char *s1, const char *s2, size_t n, size_t s1len) { if (__builtin_expect (s1len < n, 0)) __chk_fail (); diff --git a/debug/swprintf_chk.c b/debug/swprintf_chk.c index eb5f986b18..563bec44a1 100644 --- a/debug/swprintf_chk.c +++ b/debug/swprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/test-stpcpy_chk.c b/debug/test-stpcpy_chk.c index 252a51a8bd..1f0bdad122 100644 --- a/debug/test-stpcpy_chk.c +++ b/debug/test-stpcpy_chk.c @@ -1,5 +1,5 @@ /* Test and measure stpcpy checking functions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jakub Jelinek <jakub@redhat.com>, 1999. diff --git a/debug/test-strcpy_chk.c b/debug/test-strcpy_chk.c index e93dd69c6b..4aab09aeb2 100644 --- a/debug/test-strcpy_chk.c +++ b/debug/test-strcpy_chk.c @@ -1,5 +1,5 @@ /* Test and measure __strcpy_chk functions. - Copyright (C) 1999-2015 Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jakub Jelinek <jakub@redhat.com>, 1999. diff --git a/debug/tst-backtrace.h b/debug/tst-backtrace.h index d0f22b6565..1a53048a49 100644 --- a/debug/tst-backtrace.h +++ b/debug/tst-backtrace.h @@ -1,6 +1,6 @@ /* Test backtrace and backtrace_symbols: common code for examining backtraces. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/tst-backtrace2.c b/debug/tst-backtrace2.c index 846ca35555..d139c10638 100644 --- a/debug/tst-backtrace2.c +++ b/debug/tst-backtrace2.c @@ -1,5 +1,5 @@ /* Test backtrace and backtrace_symbols. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -94,6 +94,12 @@ fn3 (void) NO_INLINE static int do_test (void) { + /* Test BZ #18084. */ + void *buffer[1]; + + if (backtrace (buffer, 0) != 0) + FAIL (); + fn3 (); return ret; } diff --git a/debug/tst-backtrace3.c b/debug/tst-backtrace3.c index 9993d66729..74514d7fe8 100644 --- a/debug/tst-backtrace3.c +++ b/debug/tst-backtrace3.c @@ -1,5 +1,5 @@ /* Test backtrace and backtrace_symbols for recursive calls. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/tst-backtrace4.c b/debug/tst-backtrace4.c index f455abd018..965e6bdfb7 100644 --- a/debug/tst-backtrace4.c +++ b/debug/tst-backtrace4.c @@ -1,5 +1,5 @@ /* Test backtrace and backtrace_symbols for signal frames. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -49,9 +49,9 @@ handle_signal (int signum) /* Get the backtrace addresses. */ n = backtrace (addresses, sizeof (addresses) / sizeof (addresses[0])); - printf ("Obtained backtrace with %d functions (but wanted at least %d)\n", + printf ("Obtained backtrace with %d functions (want at least %d)\n", n, NUM_FUNCTIONS); - /* Check that there are at least six functions. */ + /* Check that there are at least NUM_FUNCTIONS functions. */ if (n < NUM_FUNCTIONS) { FAIL (); diff --git a/debug/tst-backtrace5.c b/debug/tst-backtrace5.c index 2a497815e2..c049bcafbc 100644 --- a/debug/tst-backtrace5.c +++ b/debug/tst-backtrace5.c @@ -1,6 +1,6 @@ /* Test backtrace and backtrace_symbols for signal frames, where a system call was interrupted by a signal. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/tst-backtrace6.c b/debug/tst-backtrace6.c index 9c1ed751bd..12214ce48b 100644 --- a/debug/tst-backtrace6.c +++ b/debug/tst-backtrace6.c @@ -1,6 +1,6 @@ /* Test backtrace and backtrace_symbols for signal frames, where a system call was interrupted by a signal. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c index 53559e6bca..4f968eee42 100644 --- a/debug/tst-chk1.c +++ b/debug/tst-chk1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2015 Free Software Foundation, Inc. +/* Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2004. @@ -264,21 +264,39 @@ do_test (void) #endif #if __USE_FORTIFY_LEVEL >= 1 - /* Now check if all buffer overflows are caught at runtime. */ + /* Now check if all buffer overflows are caught at runtime. + N.B. All tests involving a length parameter need to be done + twice: once with the length a compile-time constant, once without. */ + + CHK_FAIL_START + memcpy (buf + 1, "abcdefghij", 10); + CHK_FAIL_END CHK_FAIL_START memcpy (buf + 1, "abcdefghij", l0 + 10); CHK_FAIL_END CHK_FAIL_START + memmove (buf + 2, buf + 1, 9); + CHK_FAIL_END + + CHK_FAIL_START memmove (buf + 2, buf + 1, l0 + 9); CHK_FAIL_END CHK_FAIL_START + p = (char *) mempcpy (buf + 6, "abcde", 5); + CHK_FAIL_END + + CHK_FAIL_START p = (char *) mempcpy (buf + 6, "abcde", l0 + 5); CHK_FAIL_END CHK_FAIL_START + memset (buf + 9, 'j', 2); + CHK_FAIL_END + + CHK_FAIL_START memset (buf + 9, 'j', l0 + 2); CHK_FAIL_END @@ -291,10 +309,18 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + strncpy (buf + 7, "X", 4); + CHK_FAIL_END + + CHK_FAIL_START strncpy (buf + 7, "X", l0 + 4); CHK_FAIL_END CHK_FAIL_START + stpncpy (buf + 6, "cd", 5); + CHK_FAIL_END + + CHK_FAIL_START stpncpy (buf + 6, "cd", l0 + 5); CHK_FAIL_END @@ -304,6 +330,10 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + snprintf (buf + 8, 3, "%d", num2); + CHK_FAIL_END + + CHK_FAIL_START snprintf (buf + 8, l0 + 3, "%d", num2); CHK_FAIL_END @@ -316,29 +346,50 @@ do_test (void) CHK_FAIL_END # endif - memcpy (buf, str1 + 2, l0 + 9); + memcpy (buf, str1 + 2, 9); CHK_FAIL_START strcat (buf, "AB"); CHK_FAIL_END - memcpy (buf, str1 + 3, l0 + 8); + memcpy (buf, str1 + 3, 8); + CHK_FAIL_START + strncat (buf, "ZYXWV", 3); + CHK_FAIL_END + + memcpy (buf, str1 + 3, 8); CHK_FAIL_START strncat (buf, "ZYXWV", l0 + 3); CHK_FAIL_END CHK_FAIL_START + memcpy (a.buf1 + 1, "abcdefghij", 10); + CHK_FAIL_END + + CHK_FAIL_START memcpy (a.buf1 + 1, "abcdefghij", l0 + 10); CHK_FAIL_END CHK_FAIL_START + memmove (a.buf1 + 2, a.buf1 + 1, 9); + CHK_FAIL_END + + CHK_FAIL_START memmove (a.buf1 + 2, a.buf1 + 1, l0 + 9); CHK_FAIL_END CHK_FAIL_START + p = (char *) mempcpy (a.buf1 + 6, "abcde", 5); + CHK_FAIL_END + + CHK_FAIL_START p = (char *) mempcpy (a.buf1 + 6, "abcde", l0 + 5); CHK_FAIL_END CHK_FAIL_START + memset (a.buf1 + 9, 'j', 2); + CHK_FAIL_END + + CHK_FAIL_START memset (a.buf1 + 9, 'j', l0 + 2); CHK_FAIL_END @@ -357,6 +408,10 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + strncpy (a.buf1 + (O + 6), "X", 4); + CHK_FAIL_END + + CHK_FAIL_START strncpy (a.buf1 + (O + 6), "X", l0 + 4); CHK_FAIL_END @@ -366,16 +421,20 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + snprintf (a.buf1 + (O + 7), 3, "%d", num2); + CHK_FAIL_END + + CHK_FAIL_START snprintf (a.buf1 + (O + 7), l0 + 3, "%d", num2); CHK_FAIL_END # endif - memcpy (a.buf1, str1 + (3 - O), l0 + 8 + O); + memcpy (a.buf1, str1 + (3 - O), 8 + O); CHK_FAIL_START strcat (a.buf1, "AB"); CHK_FAIL_END - memcpy (a.buf1, str1 + (4 - O), l0 + 7 + O); + memcpy (a.buf1, str1 + (4 - O), 7 + O); CHK_FAIL_START strncat (a.buf1, "ZYXWV", l0 + 3); CHK_FAIL_END @@ -504,25 +563,47 @@ do_test (void) #endif #if __USE_FORTIFY_LEVEL >= 1 - /* Now check if all buffer overflows are caught at runtime. */ + /* Now check if all buffer overflows are caught at runtime. + N.B. All tests involving a length parameter need to be done + twice: once with the length a compile-time constant, once without. */ + + CHK_FAIL_START + wmemcpy (wbuf + 1, L"abcdefghij", 10); + CHK_FAIL_END CHK_FAIL_START wmemcpy (wbuf + 1, L"abcdefghij", l0 + 10); CHK_FAIL_END CHK_FAIL_START + wmemcpy (wbuf + 9, L"abcdefghij", 10); + CHK_FAIL_END + + CHK_FAIL_START wmemcpy (wbuf + 9, L"abcdefghij", l0 + 10); CHK_FAIL_END CHK_FAIL_START + wmemmove (wbuf + 2, wbuf + 1, 9); + CHK_FAIL_END + + CHK_FAIL_START wmemmove (wbuf + 2, wbuf + 1, l0 + 9); CHK_FAIL_END CHK_FAIL_START + wp = wmempcpy (wbuf + 6, L"abcde", 5); + CHK_FAIL_END + + CHK_FAIL_START wp = wmempcpy (wbuf + 6, L"abcde", l0 + 5); CHK_FAIL_END CHK_FAIL_START + wmemset (wbuf + 9, L'j', 2); + CHK_FAIL_END + + CHK_FAIL_START wmemset (wbuf + 9, L'j', l0 + 2); CHK_FAIL_END @@ -535,6 +616,10 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + wcsncpy (wbuf + 7, L"X", 4); + CHK_FAIL_END + + CHK_FAIL_START wcsncpy (wbuf + 7, L"X", l0 + 4); CHK_FAIL_END @@ -547,32 +632,52 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + wcpncpy (wbuf + 6, L"cd", 5); + CHK_FAIL_END + + CHK_FAIL_START wcpncpy (wbuf + 6, L"cd", l0 + 5); CHK_FAIL_END - wmemcpy (wbuf, wstr1 + 2, l0 + 9); + wmemcpy (wbuf, wstr1 + 2, 9); CHK_FAIL_START wcscat (wbuf, L"AB"); CHK_FAIL_END - wmemcpy (wbuf, wstr1 + 3, l0 + 8); + wmemcpy (wbuf, wstr1 + 3, 8); CHK_FAIL_START wcsncat (wbuf, L"ZYXWV", l0 + 3); CHK_FAIL_END CHK_FAIL_START + wmemcpy (wa.buf1 + 1, L"abcdefghij", 10); + CHK_FAIL_END + + CHK_FAIL_START wmemcpy (wa.buf1 + 1, L"abcdefghij", l0 + 10); CHK_FAIL_END CHK_FAIL_START + wmemmove (wa.buf1 + 2, wa.buf1 + 1, 9); + CHK_FAIL_END + + CHK_FAIL_START wmemmove (wa.buf1 + 2, wa.buf1 + 1, l0 + 9); CHK_FAIL_END CHK_FAIL_START + wp = wmempcpy (wa.buf1 + 6, L"abcde", 5); + CHK_FAIL_END + + CHK_FAIL_START wp = wmempcpy (wa.buf1 + 6, L"abcde", l0 + 5); CHK_FAIL_END CHK_FAIL_START + wmemset (wa.buf1 + 9, L'j', 2); + CHK_FAIL_END + + CHK_FAIL_START wmemset (wa.buf1 + 9, L'j', l0 + 2); CHK_FAIL_END @@ -591,15 +696,19 @@ do_test (void) CHK_FAIL_END CHK_FAIL_START + wcsncpy (wa.buf1 + (O + 6), L"X", 4); + CHK_FAIL_END + + CHK_FAIL_START wcsncpy (wa.buf1 + (O + 6), L"X", l0 + 4); CHK_FAIL_END - wmemcpy (wa.buf1, wstr1 + (3 - O), l0 + 8 + O); + wmemcpy (wa.buf1, wstr1 + (3 - O), 8 + O); CHK_FAIL_START wcscat (wa.buf1, L"AB"); CHK_FAIL_END - wmemcpy (wa.buf1, wstr1 + (4 - O), l0 + 7 + O); + wmemcpy (wa.buf1, wstr1 + (4 - O), 7 + O); CHK_FAIL_START wcsncat (wa.buf1, L"ZYXWV", l0 + 3); CHK_FAIL_END @@ -884,6 +993,11 @@ do_test (void) if (read (fileno (stdin), buf, sizeof (buf) + 1) != sizeof (buf) + 1) FAIL (); CHK_FAIL_END + + CHK_FAIL_START + if (read (fileno (stdin), buf, l0 + sizeof (buf) + 1) != sizeof (buf) + 1) + FAIL (); + CHK_FAIL_END #endif if (pread (fileno (stdin), buf, sizeof (buf) - 1, sizeof (buf) - 2) @@ -904,6 +1018,12 @@ do_test (void) != sizeof (buf) + 1) FAIL (); CHK_FAIL_END + + CHK_FAIL_START + if (pread (fileno (stdin), buf, l0 + sizeof (buf) + 1, 2 * sizeof (buf)) + != sizeof (buf) + 1) + FAIL (); + CHK_FAIL_END #endif if (pread64 (fileno (stdin), buf, sizeof (buf) - 1, sizeof (buf) - 2) @@ -924,6 +1044,12 @@ do_test (void) != sizeof (buf) + 1) FAIL (); CHK_FAIL_END + + CHK_FAIL_START + if (pread64 (fileno (stdin), buf, l0 + sizeof (buf) + 1, 2 * sizeof (buf)) + != sizeof (buf) + 1) + FAIL (); + CHK_FAIL_END #endif if (freopen (temp_filename, "r", stdin) == NULL) @@ -1435,23 +1561,38 @@ do_test (void) fd_set s; FD_ZERO (&s); + FD_SET (FD_SETSIZE - 1, &s); #if __USE_FORTIFY_LEVEL >= 1 CHK_FAIL_START FD_SET (FD_SETSIZE, &s); CHK_FAIL_END + + CHK_FAIL_START + FD_SET (l0 + FD_SETSIZE, &s); + CHK_FAIL_END #endif + FD_CLR (FD_SETSIZE - 1, &s); #if __USE_FORTIFY_LEVEL >= 1 CHK_FAIL_START FD_CLR (FD_SETSIZE, &s); CHK_FAIL_END + + CHK_FAIL_START + FD_SET (l0 + FD_SETSIZE, &s); + CHK_FAIL_END #endif + FD_ISSET (FD_SETSIZE - 1, &s); #if __USE_FORTIFY_LEVEL >= 1 CHK_FAIL_START FD_ISSET (FD_SETSIZE, &s); CHK_FAIL_END + + CHK_FAIL_START + FD_ISSET (l0 + FD_SETSIZE, &s); + CHK_FAIL_END #endif struct pollfd fds[1]; @@ -1462,12 +1603,20 @@ do_test (void) CHK_FAIL_START poll (fds, 2, 0); CHK_FAIL_END + + CHK_FAIL_START + poll (fds, l0 + 2, 0); + CHK_FAIL_END #endif ppoll (fds, 1, NULL, NULL); #if __USE_FORTIFY_LEVEL >= 1 CHK_FAIL_START ppoll (fds, 2, NULL, NULL); CHK_FAIL_END + + CHK_FAIL_START + ppoll (fds, l0 + 2, NULL, NULL); + CHK_FAIL_END #endif return ret; diff --git a/debug/tst-longjmp_chk3.c b/debug/tst-longjmp_chk3.c index acd6704fc5..a8bc41c13f 100644 --- a/debug/tst-longjmp_chk3.c +++ b/debug/tst-longjmp_chk3.c @@ -1,5 +1,5 @@ /* Make sure longjmp fortification catches bad signal stacks. - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/ttyname_r_chk.c b/debug/ttyname_r_chk.c index 017939dab7..d51d3490f6 100644 --- a/debug/ttyname_r_chk.c +++ b/debug/ttyname_r_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vasprintf_chk.c b/debug/vasprintf_chk.c index 8ecb9e84b0..cb1f74a1e0 100644 --- a/debug/vasprintf_chk.c +++ b/debug/vasprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vdprintf_chk.c b/debug/vdprintf_chk.c index bf43ed8f8b..05d0bcd7e7 100644 --- a/debug/vdprintf_chk.c +++ b/debug/vdprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vfprintf_chk.c b/debug/vfprintf_chk.c index 76e4669b06..4524f514b9 100644 --- a/debug/vfprintf_chk.c +++ b/debug/vfprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vfwprintf_chk.c b/debug/vfwprintf_chk.c index bfcaced4eb..c3ac2307f3 100644 --- a/debug/vfwprintf_chk.c +++ b/debug/vfwprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vprintf_chk.c b/debug/vprintf_chk.c index 128d556ed4..b4a959f94f 100644 --- a/debug/vprintf_chk.c +++ b/debug/vprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vsnprintf_chk.c b/debug/vsnprintf_chk.c index c6cb3831fa..cc559d2b1d 100644 --- a/debug/vsnprintf_chk.c +++ b/debug/vsnprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vsprintf_chk.c b/debug/vsprintf_chk.c index 1ec67b5495..aa1587ce6f 100644 --- a/debug/vsprintf_chk.c +++ b/debug/vsprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2015 Free Software Foundation, Inc. +/* Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,9 +24,7 @@ static int _IO_str_chk_overflow (_IO_FILE *fp, int c) __THROW; static int -_IO_str_chk_overflow (fp, c) - _IO_FILE *fp; - int c; +_IO_str_chk_overflow (_IO_FILE *fp, int c) { /* When we come to here this means the user supplied buffer is filled. */ diff --git a/debug/vswprintf_chk.c b/debug/vswprintf_chk.c index 410baea9b3..50bdb784b8 100644 --- a/debug/vswprintf_chk.c +++ b/debug/vswprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/vwprintf_chk.c b/debug/vwprintf_chk.c index 81a453e6c4..c954e29915 100644 --- a/debug/vwprintf_chk.c +++ b/debug/vwprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/warning-nop.c b/debug/warning-nop.c index f5c91082ca..f93221fc67 100644 --- a/debug/warning-nop.c +++ b/debug/warning-nop.c @@ -1,5 +1,5 @@ /* Dummy nop functions to elicit link-time warnings. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wcpcpy_chk.c b/debug/wcpcpy_chk.c index f910d2007c..36a17f0429 100644 --- a/debug/wcpcpy_chk.c +++ b/debug/wcpcpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. diff --git a/debug/wcpncpy_chk.c b/debug/wcpncpy_chk.c index e64275fbee..e370535458 100644 --- a/debug/wcpncpy_chk.c +++ b/debug/wcpncpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. diff --git a/debug/wcrtomb_chk.c b/debug/wcrtomb_chk.c index ee2ab57dd5..d4c5eb2239 100644 --- a/debug/wcrtomb_chk.c +++ b/debug/wcrtomb_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wcscat_chk.c b/debug/wcscat_chk.c index 923cf0febe..9a5db3ff44 100644 --- a/debug/wcscat_chk.c +++ b/debug/wcscat_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. diff --git a/debug/wcscpy_chk.c b/debug/wcscpy_chk.c index 3ae0cea525..9cd9dd0991 100644 --- a/debug/wcscpy_chk.c +++ b/debug/wcscpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. diff --git a/debug/wcsncat_chk.c b/debug/wcsncat_chk.c index 1453ee86f2..b5dd3d93cb 100644 --- a/debug/wcsncat_chk.c +++ b/debug/wcsncat_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. diff --git a/debug/wcsncpy_chk.c b/debug/wcsncpy_chk.c index 78c6a9cc9b..79f1e4504c 100644 --- a/debug/wcsncpy_chk.c +++ b/debug/wcsncpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. +/* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. diff --git a/debug/wcsnrtombs_chk.c b/debug/wcsnrtombs_chk.c index 2e86dfcabf..5ba6232487 100644 --- a/debug/wcsnrtombs_chk.c +++ b/debug/wcsnrtombs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wcsrtombs_chk.c b/debug/wcsrtombs_chk.c index f499b48f33..d7733c602e 100644 --- a/debug/wcsrtombs_chk.c +++ b/debug/wcsrtombs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wcstombs_chk.c b/debug/wcstombs_chk.c index 30ed7e2166..48b0842aa1 100644 --- a/debug/wcstombs_chk.c +++ b/debug/wcstombs_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wctomb_chk.c b/debug/wctomb_chk.c index 8d449869b2..9cfa5efc8e 100644 --- a/debug/wctomb_chk.c +++ b/debug/wctomb_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/wmemcpy_chk.c b/debug/wmemcpy_chk.c index 06054fb648..ef14a201d6 100644 --- a/debug/wmemcpy_chk.c +++ b/debug/wmemcpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. diff --git a/debug/wmemmove_chk.c b/debug/wmemmove_chk.c index be269063d8..329aef546c 100644 --- a/debug/wmemmove_chk.c +++ b/debug/wmemmove_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu> diff --git a/debug/wmempcpy_chk.c b/debug/wmempcpy_chk.c index db745e1d06..b5cc8e5572 100644 --- a/debug/wmempcpy_chk.c +++ b/debug/wmempcpy_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2015 Free Software Foundation, Inc. +/* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1999. diff --git a/debug/wmemset_chk.c b/debug/wmemset_chk.c index 23e1217316..88079a1d31 100644 --- a/debug/wmemset_chk.c +++ b/debug/wmemset_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2015 Free Software Foundation, Inc. +/* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. diff --git a/debug/wprintf_chk.c b/debug/wprintf_chk.c index 18ce3bbcf4..a22b0d426b 100644 --- a/debug/wprintf_chk.c +++ b/debug/wprintf_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2015 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/debug/xtrace.sh b/debug/xtrace.sh index 361848ff58..2f69812d84 100755 --- a/debug/xtrace.sh +++ b/debug/xtrace.sh @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999-2015 Free Software Foundation, Inc. +# Copyright (C) 1999-2016 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper <drepper@gnu.org>, 1999. @@ -64,7 +64,7 @@ do_version() { printf $"Copyright (C) %s Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -" "2015" +" "2016" printf $"Written by %s. " "Ulrich Drepper" exit 0 |