Commit Graph

31791 Commits

Author SHA1 Message Date
H.J. Lu
eb73083e5e Don't include _dl_resolve_conflicts in libc.a [BZ #21742]
Since _dl_resolve_conflicts is only used in elf/rtld.c, don't include
it in libc.a.

	[BZ #21742]
	* elf/Makefile (dl-routines): Move dl-conflict to ...
	(rtld-routines): Here.
2017-07-10 05:16:40 -07:00
H.J. Lu
7a499756ab x86-64: Test memmove_chk and memset_chk only in libc.so [BZ #21741]
Since there are no multiarch versions of memmove_chk and memset_chk,
test multiarch versions of memmove_chk and memset_chk only in libc.so.

	[BZ #21741]
	* sysdeps/x86_64/multiarch/ifunc-impl-list.c
	(__libc_ifunc_impl_list): Test memmove_chk and memset_chk only
	in libc.so.
2017-07-10 04:44:38 -07:00
Mike FABIAN
5fa205d485 Add iI and eE to yesexpr and noexpr respectively for ts_ZA 2017-07-10 09:02:24 +02:00
John David Anglin
2e783eb905 Update hppa ulps. 2017-07-09 15:22:41 -04:00
John David Anglin
c5f70682a5 Use generic pthread support on hppa. 2017-07-09 15:01:11 -04:00
H.J. Lu
58d021c836 x86-64: Update comments in IFUNC selectors
* sysdeps/x86_64/multiarch/memcmp.c: Update comments.
	* sysdeps/x86_64/multiarch/memmove.c: Likewise.
	* sysdeps/x86_64/multiarch/memrchr.c: Likewise.
	* sysdeps/x86_64/multiarch/memset.c: Likewise.
	* sysdeps/x86_64/multiarch/rawmemchr.c: Likewise.
	* sysdeps/x86_64/multiarch/strchrnul.c: Likewise.
	* sysdeps/x86_64/multiarch/strlen.c: Likewise.
	* sysdeps/x86_64/multiarch/strnlen.c: Likewise.
	* sysdeps/x86_64/multiarch/wcschr.c: Likewise.
	* sysdeps/x86_64/multiarch/wcscpy.c: Likewise.
	* sysdeps/x86_64/multiarch/wcslen.c: Likewise.
	* sysdeps/x86_64/multiarch/wcsnlen.c: Likewise.
	* sysdeps/x86_64/multiarch/wmemchr.c: Likewise.
	* sysdeps/x86_64/multiarch/wmemcmp.c: Likewise.
	* sysdeps/x86_64/multiarch/wmemset.c: Likewise.
	* sysdeps/x86_64/multiarch/wmemset_chk.c: Likewise.
2017-07-09 11:43:20 -07:00
H.J. Lu
4df54c89bb x86-64: Update comments in ifunc-impl-list.c
All x86-64 IFUNC selectors are written in C now.  Update comments to
reflect it.

	* sysdeps/x86_64/multiarch/ifunc-impl-list.c: Update comments.
2017-07-09 11:38:37 -07:00
John David Anglin
7023e6db99 Fix BZ #21049. 2017-07-09 13:48:04 -04:00
Andreas Schwab
218bb835cd build-many-glibcs.py: also build profiled objects 2017-07-08 21:09:03 +02:00
Akhilesh Kumar
51e945a8f9 Added yesstr/nostr for kw_GB
[BZ #21734]
	* locales/kw_GB (LC_MESSAGES): add yesstr and nostr
2017-07-07 17:16:47 +02:00
Akhilesh Kumar
60e6738932 Added missing yesstr and nostr for Tsonga language locale [LC_MESSAGES]
[BZ #21727]
	* locales/ts_ZA(LC_MESSAGES): add yesstr and nostr

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-07 17:16:47 +02:00
Akhilesh Kumar
42c1c0e7f5 Fix LC_NAME for hi_IN
During Hindi Locale review I found many fields are incorrect

	[BZ #21729]
	* locales/hi_IN (LC_NAME): Fix name_mr, name_mrs, name_miss, name_ms

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-07 13:28:55 +02:00
Akhilesh Kumar
254bdaeb06 yesstr/nostr missing for Xhosa language locale
During Locale verification I observed that
yesstr and nostr  are missing for Xhosa language locale
for South Africa

	[BZ #21724]
	* locales/xh_ZA (LC_MESSAGES): add yesstr and nostr

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-07 12:59:38 +02:00
Peng Wu
c58ba95be9 Add yesstr and nostr to zh_CN locale
[BZ #21723]
	* locales/zh_CN (LC_MESSAGES): add yesstr and nostr
2017-07-07 12:59:22 +02:00
Akhilesh Kumar
bc6bd727cd Incorrect Full Weekday names for ks_IN@devanagari
During Locale verification I observed that
Incorrect Full Weekday names for ks_IN@devanagari
Reference is taken from
http://www.mkraina.com/PDF/3-Self-authored%20Works%20(English)/15.pdf

And kashmiri devanagari travel book and other sources

	[BZ #21721]
	* locales/ks_IN@devanagari: Full weekday name Fix.

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-07 11:00:49 +02:00
DJ Delorie
be8aa923a7 * manual/tunables.texi: Add missing @end deftp. 2017-07-06 19:54:13 -04:00
Florian Weimer
9f5a127131 resolv: Deal with non-deterministic address order in tst-resolv-basic 2017-07-06 22:55:53 +02:00
DJ Delorie
d5c3fafc43 Add per-thread cache to malloc
* config.make.in: Enable experimental malloc option.
* configure.ac: Likewise.
* configure: Regenerate.
* manual/install.texi: Document it.
* INSTALL: Regenerate.
* malloc/Makefile: Likewise.
* malloc/malloc.c: Add per-thread cache (tcache).
(tcache_put): New.
(tcache_get): New.
(tcache_thread_freeres): New.
(tcache_init): New.
(__libc_malloc): Use cached chunks if available.
(__libc_free): Initialize tcache if needed.
(__libc_realloc): Likewise.
(__libc_calloc): Likewise.
(_int_malloc): Prefill tcache when appropriate.
(_int_free): Likewise.
(do_set_tcache_max): New.
(do_set_tcache_count): New.
(do_set_tcache_unsorted_limit): New.
* manual/probes.texi: Document new probes.
* malloc/arena.c: Add new tcache tunables.
* elf/dl-tunables.list: Likewise.
* manual/tunables.texi: Document them.
* NEWS: Mention the per-thread cache.
2017-07-06 13:37:30 -04:00
Joseph Myers
3cefdd7310 Increase some test timeouts.
This patch increases the timeouts for some tests that I've seen timing
out on slow systems in my 2.26 release testing.  (In the case of
tst-tsearch.c, increasing the timeout means removing a setting of 10
that was put there before the default timeout was increased to 20
seconds, so putting the default into effect.)

	* iconvdata/tst-loading.c (TIMEOUT): Define to 30.
	* misc/tst-tsearch.c (TIMEOUT): Remove.
	* nptl/tst-create-detached.c (TIMEOUT): Define to 100.
	* nptl/tst-robust-fork.c (TIMEOUT): Likewise.
	* nptl/tst-rwlock19.c (TIMEOUT): Likewise.
	* string/tst-cmp.c (TIMEOUT): Define to 600.
2017-07-06 17:01:03 +00:00
Rafal Luzynski
1bea5858dd Arabic scripts: More fixes after the recent import.
After the recent import of month names from CLDRv31 (bug 21217,
commit c853f14) more imports are also needed, mostly abbreviated month
names.

This patch also updates May (full month name) in ps_AF which was
skipped in the previous patch.

Incidentally, this import fixes bug 17225 (ar_SY) and partially
bug 19066 (ar_SA).

CLDR currently has a bug in the full month name for October for ar_IQ, see
http://unicode.org/cldr/trac/ticket/10460

	* localedata/locales/ar_DZ (abmon): Full import from CLDR, abmon
	is no longer abbreviated.
	* localedata/locales/ar_IQ (abmon): Likewise.
	* localedata/locales/ar_MA (abmon): Likewise.
	* localedata/locales/ar_TN (abmon): Likewise.
	* localedata/locales/ps_AF (abmon): Likewise.
	* localedata/locales/ug_CN (abmon): Likewise.
	* localedata/locales/ar_SA (abmon): Likewise, partially
	fixes bug 19066.
	* localedata/locales/ks_IN (abmon): A copy of mon.
	* localedata/locales/ur_IN (abmon): Oct reworded "اكتوبر" to
	"اکتوبر" (same change as mon).
	* localedata/locales/ur_PK (abmon): Same changes as mon applied.

	* localedata/locales/ps_AF (mon): May reworded "می" to "مۍ".

	[BZ #17225]
	* localedata/locales/ar_SY (abmon): May reworded "نوار" to
	"أيار", this closes bug 17225.
	* localedata/locales/ar_JO (abmon): Likewise.
	* localedata/locales/ar_LB (abmon): Likewise.
2017-07-06 15:49:35 +02:00
Matthew Krupcale
3adfef7eaa nptl: Fix typo on __have_pthread_attr_t (BZ#21715)
This patch fixes some build issues when including types/sigevent_t.h
along with bits/pthreadtypes.h.

Checked on x86_64-linux-gnu and on a build on supported major ABIs.

	[BZ #21715]
	* sysdeps/nptl/bits/pthreadtypes.h (__have_pthread_attr_t): Fix typo
	on definition.
2017-07-06 10:27:24 -03:00
H.J. Lu
031e519c95 x86-64: Align the stack in __tls_get_addr [BZ #21609]
This change forces realignment of the stack pointer in __tls_get_addr, so
that binaries compiled by GCCs older than GCC 4.9:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

continue to work even if vector instructions are used in glibc which
require the ABI stack realignment.

__tls_get_addr_slow is added to handle the slow paths in the default
implementation of__tls_get_addr in elf/dl-tls.c.  The new __tls_get_addr
calls __tls_get_addr_slow after realigning the stack.  Internal calls
within ld.so go directly to the default implementation of __tls_get_addr
because they do not need stack realignment.

	[BZ #21609]
	* sysdeps/x86_64/Makefile (sysdep-dl-routines): Add tls_get_addr.
	(gen-as-const-headers): Add rtld-offsets.sym.
	* sysdeps/x86_64/dl-tls.c: New file.
	* sysdeps/x86_64/rtld-offsets.sym: Likwise.
	* sysdeps/x86_64/tls_get_addr.S: Likewise.
	* sysdeps/x86_64/dl-tls.h: Add multiple inclusion guards.
	* sysdeps/x86_64/tlsdesc.sym (TI_MODULE_OFFSET): New.
	(TI_OFFSET_OFFSET): Likwise.
2017-07-06 04:43:20 -07:00
Akhilesh Kumar
0cae0b1a28 Pashto yesstr/nostr locale are missing
[BZ #21711]
During Locale verification I observed that

yesstr and nostr are missing for Pashto [LC_MESSAGES] Locale

For Afghanistan reference google translate and Pashto travel book.
2017-07-06 09:34:58 +02:00
Adhemerval Zanella
db6b2f2522 posix: Fix default posix_spawn return value
This patch fix the return value for error conditions for default
posix_spawn (where the errno is expected).  It also avoid clobber
errno on fork call.

Checked on x86_64 (with Linux implementation removed).

	[BZ# 21697]
	* sysdeps/posix/spawni.c (__spawni_child): Fix return value.
	(__spawnix): Do not clober errno.
2017-07-05 15:58:31 -03:00
Carlos O'Donell
b8e0e03b7c Fixup localedata/ChangeLog.
- Rewrite recent entry to follow GNU ChangeLog format.
- Convert spaces to tabs in one case.
2017-07-05 14:14:44 -04:00
Joseph Myers
8d6cba414a Edit and shorten float128 NEWS item. 2017-07-05 17:44:26 +00:00
Florian Weimer
cb3c27e87b support: Add resolver testing mode which does not patch _res 2017-07-05 19:04:40 +02:00
Florian Weimer
d4165eedf5 support: Add support_chroot_create and support_chroot_free 2017-07-05 19:04:40 +02:00
Florian Weimer
76637a921f support: Check isolation of loopback addresses in tst-support-namespace 2017-07-05 19:04:39 +02:00
Akhilesh Kumar
97e7b6aa42 Added Tok-Pisin locale.
[BZ #21694]
Added tok-pisin language locale for Papua New Guinea.

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-05 18:40:08 +02:00
Joseph Myers
7e368000c0 Consistently say "GNU C Library" in NEWS, not "glibc". 2017-07-05 13:46:57 +00:00
Zack Weinberg
2b2ccd0c63 Reorganize and revise NEWS for 2.26. 2017-07-05 09:03:00 -04:00
Akhilesh Kumar
cc31b141f9 For Breton yesstr/nostr locale are missing
[BZ #21706]
During Locale verification i observed that
yesstr and nostr  are missing for Breton [LC_MESSAGES] locale

Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com>
2017-07-04 17:25:52 +02:00
Szabolcs Nagy
d2e0491883 Single threaded stdio optimization
Locking overhead can be significant in some stdio operations
that are common in single threaded applications.

This patch adds the _IO_FLAGS2_NEED_LOCK flag to indicate if
an _IO_FILE object needs to be locked and some of the stdio
functions just jump to their _unlocked variant when not.  The
flag is set on all _IO_FILE objects when the first thread is
created.  A new GLIBC_PRIVATE libc symbol, _IO_enable_locks,
was added to do this from libpthread.

The optimization can be applied to more stdio functions,
currently it is only applied to single flag check or single
non-wide-char standard operations.  The flag should probably
be never set for files with _IO_USER_LOCK, but that's just a
further optimization, not a correctness requirement.

The optimization is valid in a single thread because stdio
operations are non-as-safe (so lock state is not observable
from a signal handler) and stdio locks are recursive (so lock
state is not observable via deadlock).  The optimization is not
valid if a thread may be created while an stdio lock is taken
and thus it should be disabled if any user code may run during
an stdio operation (interposed malloc, printf hooks, etc).
This makes the optimization more complicated for some stdio
operations (e.g. printf), but those are bigger and thus less
important to optimize so this patch does not try to do that.

	* libio/libio.h (_IO_FLAGS2_NEED_LOCK, _IO_need_lock): Define.
	* libio/libioP.h (_IO_enable_locks): Declare.
	* libio/Versions (_IO_enable_locks): New symbol.
	* libio/genops.c (_IO_enable_locks): Define.
	(_IO_old_init): Initialize flags2.
	* libio/feof.c.c (_IO_feof): Avoid locking when not needed.
	* libio/ferror.c (_IO_ferror): Likewise.
	* libio/fputc.c (fputc): Likewise.
	* libio/putc.c (_IO_putc): Likewise.
	* libio/getc.c (_IO_getc): Likewise.
	* libio/getchar.c (getchar): Likewise.
	* libio/ioungetc.c (_IO_ungetc): Likewise.
	* nptl/pthread_create.c (__pthread_create_2_1): Enable stdio locks.
	* libio/iofopncook.c (_IO_fopencookie): Enable locking for the file.
	* sysdeps/pthread/flockfile.c (__flockfile): Likewise.
2017-07-04 16:05:12 +01:00
Florian Weimer
1ff6c67a25 sysconf: Use conservative default for _SC_NPROCESSORS_ONLN [BZ #21542] 2017-07-04 16:12:46 +02:00
Florian Weimer
4446a885f3 resolv: Fix resolv_conf _res matching
A dot-less host name without an /etc/resolv.conf file caused an
assertion failure in update_from_conf because the function would not
deal correctly with the empty search list case.

Thanks to Andreas Schwab for debugging assistence.
2017-07-04 15:26:05 +02:00
Joseph Myers
f0107724c9 Update versions in build-many-glibcs.py.
This patch updates build-many-glibcs.py to use the current release
branch of binutils and current releases of GMP and the Linux kernel.

	* scripts/build-many-glibcs.py (Context.checkout): Default
	binutils version to 2.29 branch, GMP version to 6.1.2 and Linux
	kernel version to 4.12.
2017-07-04 10:32:54 +00:00
Florian Weimer
89f6307c5d resolv: Fix improper assert in __resolv_conf_attach 2017-07-04 11:18:34 +02:00
Florian Weimer
e237357a5a resolv: Introduce free list for resolv_conf index slosts 2017-07-03 21:07:11 +02:00
Florian Weimer
aef16cc8a4 resolv: Automatically reload a changed /etc/resolv.conf file [BZ #984]
This commit enhances the stub resolver to reload the configuration
in the per-thread _res object if the /etc/resolv.conf file has
changed.  The resolver checks whether the application has modified
_res and will not overwrite the _res object in that case.

The struct resolv_context mechanism is used to check the
configuration file only once per name lookup.
2017-07-03 21:06:23 +02:00
Florian Weimer
a1c4eb8794 resolv: Mirror the entire resolver configuration in struct resolv_conf
This commit adds the remaining unchanging members (which are loaded
from /etc/resolv.conf) to struct resolv_conf.

The extended name server list is currently not used by the stub
resolver.  The switch depends on a cleanup: The _u._ext.nssocks
array stores just a single socket, and needs to be replaced with
a single socket value.

(The compatibility gethostname implementation does not use the
extended addres sort list, either.  Updating the compat code is
not worthwhile.)
2017-07-03 21:03:21 +02:00
Florian Weimer
3f853f22c8 resolv: Lift domain search list limits [BZ #19569] [BZ #21475]
This change uses the extended resolver state in struct resolv_conf to
store the search list.  If applications have not patched the _res
object directly, this extended search list will be used by the stub
resolver during name resolution.
2017-07-03 21:01:42 +02:00
Florian Weimer
f30a54b21b resolv: Introduce struct resolv_conf with extended resolver state
This change provides additional resolver configuration state which
is not exposed through the _res ABI.  It reuses the existing
initstamp field in the supposedly-private part of _res.  Some effort
is undertaken to avoid memory safety issues introduced by applications
which directly patch the _res object.

With this commit, only the initstamp field is moved into struct
resolv_conf.  Additional members will be added later, eventually
migrating the entire resolver configuration.
2017-07-03 20:57:28 +02:00
Florian Weimer
352f4ff9a2 resolv: Introduce struct resolv_context [BZ #21668]
struct resolv_context objects provide a temporary resolver context
which does not change during a name lookup operation.  Only when the
outmost context is created, the stub resolver configuration is
verified to be current (at present, only against previous res_init
calls).  Subsequent attempts to obtain the context will reuse the
result of the initial verification operation.

struct resolv_context can also be extended in the future to store
data which needs to be deallocated during thread cancellation.
2017-07-03 20:52:59 +02:00
Florian Weimer
4e45d83c92 resolv: Add preinit tests to resolv/tst-resolv-res_init-skeleton.c 2017-07-03 17:54:48 +02:00
Rafal Luzynski
073ec86e5e More fixes after the recent import from CLDR-31
After the recent import of month names from CLDR (bug 21217) more
imports are also needed, mostly abbreviated month names.

	* localedata/locales/br_FR (abmon): Reworded "Eve " to "Mezh".

	* localedata/locales/fy_NL (abmon): Reworded "Maa" (March) to
	"Mrt" and "Maa" (May) to "Mai".

	* localedata/locales/lg_UG (abmon): Reworded "Jun" to "Juu".

	* localedata/locales/ln_CD (abmon): "yan", "fbl", "msi",
	and so on.

	* localedata/locales/mn_MN (abmon): "1-р сар", "2-р сар",
	"3-р сар", and so on.

	* localedata/locales/vi_VN (abmon): Reworded "Th01" to "Thg 1",
	"Th02" to "Thg 2" and so on.

	* localedata/locales/yo_NG (abday): "Àìkú", "Ajé", "Ìsẹ́gun",
	and so on, also comment updated to match the new content.
	(day): "Ọjọ́ Àìkú", "Ọjọ́ Ajé", "Ọjọ́ Ìsẹ́gun", and so on.
	(abmon): "Ṣẹ́rẹ́", "Èrèlè", "Ẹrẹ̀nà", and so on.
	(mon): Comment updated to match the actual content.
	(d_t_fmt): Changed "%A" to "%a" and "%B" to "%b".

	* localedata/locales/zu_ZA (abmon): "Jan", "Feb", "Mas",
	and so on, also comment updated to match the new content.
	(mon): comment updated to match the actual content.
2017-07-03 09:10:12 +02:00
Rajalakshmi Srinivasaraghavan
2572f356b1 powerpc: Clean up strlen and strnlen for power8
To align a quadword aligned address to 64 bytes, maximum of three
16 bytes load is needed for worst case instead of loading four times.
2017-07-03 10:46:13 +05:30
H.J. Lu
8dc6133eff Use __builtin_popcount in __sched_cpucount [BZ #21696]
posix/sched_cpucount.c assumes that size of __cpu_mask == size of long,
which is incorrect for x32.  This patch uses __builtin_popcount, which
is availabe in GCC 4.9, in posix/sched_cpucount.c.

Tested on i686, x86-64 and x32 with multi-arch disabled.

	[BZ #21696]
	* posix/sched_cpucount.c: Don't include <limits.h>.
	(__sched_cpucount): Use __builtin_popcount.
2017-07-01 07:29:32 -07:00
Siddhesh Poyarekar
47ea614b9a Fix typo in glibc.tune.cpu name 2017-07-01 19:51:44 +05:30
Gabriel F. T. Gomes
8466ee1cb7 float128: Add signbit alternative for old compilers
In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
e.g.: __builtin_signbitf128, before GCC 6.  However, there has never
been a __builtin_signbitf128 in GCC and the type-generic builtin is
only available since GCC 6.  For older GCC, this patch defines
__builtin_signbitf128 to __signbitf128, so that the internal function
is used instead of the non-existent builtin.

This patch also changes the implementation of __signbitf128, because
it was reusing the implementation of __signbitl from ldbl-128, which
calls __builtin_signbitl.  Using the long double version of the
builtin is not correct on machines where _Float128 is ABI-distinct
from long double (i.e.: ia64, powerpc64le, x86, x86_84).  The new
implementation does not rely on builtins when being built with GCC
versions older than 6.0.

The new code does not currently affect powerpc64le builds, because
only GCC 6.2 fulfills the requirements from configure.  It might
affect powerpc64le builds if those requirements are backported to
older versions of the compiler.  The new code affects x86_64 builds,
since glibc is supposed to build correctly with older versions of GCC.

Tested for powerpc64le and x86_64.

	* include/math.h (__signbitf128): Define as hidden.
	* sysdeps/ieee754/float128/s_signbitf128.c (__signbitf128):
	Reimplement without builtins.
	* sysdeps/ia64/bits/floatn.h [!__GNUC_PREREQ (6, 0)]
	(__builtin_signbitf128): Define to __signbitf128.
	* sysdeps/powerpc/bits/floatn.h: Likewise.
	* sysdeps/x86/bits/floatn.h: Likewise.
2017-06-30 18:34:29 -03:00