| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inttypes.h and stdint.h are in sysdeps/generic, but there are no other
versions of these headers anywhere in the source tree, so they aren’t
actually system-dependent. Move them to the subdirectory that
installs them (stdlib).
Reviewed-by: Joseph Myers <joseph@codesourcery.com>
* sysdeps/generic/inttypes.h, sysdeps/generic/stdint.h:
Move to stdlib.
* include/inttypes.h: Adjust to match.
* include/stdint.h: New wrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with commit 1616d034b61622836d3a36af53dcfca7624c844e
the output was corrupted on some platforms as _dl_procinfo
was called for every auxv entry and on some architectures like s390
all entries were represented as "AT_HWCAP".
This patch is removing the condition and let _dl_procinfo decide if
an entry is printed in a platform specific or generic way.
This patch also adjusts all _dl_procinfo implementations which assumed
that they are only called for AT_HWCAP or AT_HWCAP2. They are now just
returning a non-zero-value for entries which are not handled platform
specifc.
ChangeLog:
* elf/dl-sysdep.c (_dl_show_auxv): Remove condition and always
call _dl_procinfo.
* sysdeps/unix/sysv/linux/s390/dl-procinfo.h (_dl_procinfo):
Ignore types other than AT_HWCAP.
* sysdeps/sparc/dl-procinfo.h (_dl_procinfo): Likewise.
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_procinfo):
Likewise.
* sysdeps/powerpc/dl-procinfo.h (_dl_procinfo): Adjust comment
in the case of falling back to generic output mechanism.
* sysdeps/unix/sysv/linux/arm/dl-procinfo.h (_dl_procinfo):
Likewise.
|
|
|
|
|
|
|
|
|
|
| |
Mark the lr register as undefined at the start of execution, so unwind
will stop at this frame. run-backtrace-*.sh from elfutils testsuite will
fail without this patch.
* sysdeps/csky/abiv2/start.S: Mark lr as undefined.
* sysdeps/unix/sysv/linux/csky/abiv2/clone.S: Likewise.
* sysdeps/unix/sysv/linux/csky/abiv2/setcontext.S: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
C-SKY GDB dose not use this file for ptrace and coredump. ptrace can use
pt_regs definition from linux kernel directly. The old definition only
got 34 regs instead of 38 regs from linux kernel, which will corrupted
the memory after ptrace PTRACE_GETREGSET call.
* sysdeps/unix/sysv/linux/csky/sys/procfs.h: Use linux definition
directly.
* sysdeps/unix/sysv/linux/csky/sys/user.h: Remove user_regs
definition.
|
|
|
|
|
|
|
|
|
|
|
|
| |
C-SKY defines SIGCONTEXT as siginfo_t *_si, struct ucontext_t * for
__profil_counter. ucontext_t get an extra __mask field which is miss
match with the struct sigcontext from linux kernel. The time value
from gprof report will be always zero without this patch. This
patch also fix the registers sequence in register-dump.h.
* sysdeps/unix/sysv/linux/csky/register-dump.h: Adjust offset change.
* sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Remove __mask field
in mcontext_t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes further coding style issues where code should have
broken lines before operators in accordance with the GNU Coding
Standards but instead was breaking lines after them.
Tested for x86_64, and with build-many-glibcs.py.
* stdio-common/vfscanf-internal.c (ARG): Break lines before rather
than after operators.
* sysdeps/mach/hurd/setitimer.c (timer_thread): Likewise.
(setitimer_locked): Likewise.
* sysdeps/mach/hurd/sigaction.c (__sigaction): Likewise.
* sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
* sysdeps/mach/pagecopy.h (PAGE_COPY_FWD): Likewise.
* sysdeps/mach/thread_state.h (machine_get_basic_state): Likewise.
* sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c
(PPC_CPU_SUPPORTED): Likewise.
* sysdeps/unix/sysv/linux/alpha/a.out.h (N_TXTOFF): Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
(stat_overflow): Likewise.
(statfs_overflow): Likewise.
* sysdeps/unix/sysv/linux/tst-personality.c (do_test): Likewise.
* sysdeps/unix/sysv/linux/tst-ttyname.c (eq_ttyname): Likewise.
(eq_ttyname_r): Likewise.
(run_chroot_tests): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
2019-03-07 Martin Liska <mliska@suse.cz>
* math/Makefile: Change location where math-vector-fortran.h is
installed.
* math/finclude/math-vector-fortran.h: Move from bits/math-vector-fortran.h.
* sysdeps/x86/fpu/finclude/math-vector-fortran.h: Move
from sysdeps/x86/fpu/bits/math-vector-fortran.h.
* scripts/check-installed-headers.sh: Skip Fortran header files.
* scripts/check-wrapper-headers.py: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch assumes realtime clock support for nptl and thus removes
all the associated code.
For __pthread_mutex_timedlock the fallback usage for the case where
lll_futex_timed_wait_bitset it not set define is also removed. The
generic lowlevellock-futex.h always define it, so for NPTL code the
check always yield true.
Checked on x86_64-linux-gnu and i686-linux-gnu.
* nptl/nptl-init.c (__have_futex_clock_realtime,
__have_futex_clock_realtime): Remove definition.
(__pthread_initialize_minimal_internal): Remove FUTEX_CLOCK_REALTIME
check test for !__ASSUME_FUTEX_CLOCK_REALTIME.
* nptl/pthread_mutex_timedlock.c (__pthread_mutex_timedlock): Assume
__ASSUME_FUTEX_CLOCK_REALTIME support.
* sysdeps/unix/sysv/linux/i386/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_FUTEX_CLOCK_REALTIME): Remove.
* sysdeps/nptl/lowlevellock-futex.h (lll_futex_timed_wait_bitset):
Adjust comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the commit
commit 81a14439417552324ec6ca71f65ddf8e7cdd51c7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Feb 5 17:35:12 2019 -0200
wcsmbs: optimize wcscat
powerpc64 and powerpc64le builds fail when configured with
--disable-multi-arch and --with-cpu=power6 (or newer), due to an
undefined reference to __GI___wcscpy. This patch fixes this on
sysdeps/powerpc/powerpc64/power6/wcscpy.c, which is only used when
multi-arch is disabled.
This patch does nothing for the failures on 32-bits powerpc builds,
because the file is under the powerpc64 subdirectory, however, powerpc
builds were already failing with --disable-multi-arch, with multiple
error messages, even before the aforementioned commit.
Tested for powerpc, powerpc64, and powerpc64le with multi-arch enabled
(all pass) and disabled (powerpc still fails as explained above).
|
|
|
|
|
|
| |
Most of the code was removed in commit
20739e5454c12acbc0479387fe795c5b19a4166f ("* elf/dl-load.c:
Remove support for systems without MAP_ANON.").
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the default function alignment to 16 bytes in order to
get rid of some unwanted performance effects.
Please see also GCC commit "S/390: Set default function
alignment to 16." (Subversion revision 262817)
ChangeLog:
* sysdeps/s390/s390-64/sysdep.h(ENTRY): Use alignment of 16byte.
* sysdeps/s390/s390-32/sysdep.h: Likewise.
|
|
|
|
|
|
|
|
|
| |
This patch adds test cases for the compatibility versions of the
functions: err, errx, verr, verrx, warn, warnx, vwarn, vwarnx (from
err.h), error, and error_at_line (from error.h), when long double has
the same format as double (-mlong-double-64).
Tested for powerpc, powerpc64 and powerpc64le.
|
|
|
|
|
|
|
|
|
|
| |
On platforms where long double may have the same format as double
(-mlong-double-64), error and error_at_line do not take that into
account and might produce wrong output if a long double conversion is
requested by the format string ('%Lf'). This patch adds compatibility
functions for this situation and redirects calls via header magic.
Tested for powerpc, powerpc64 and powerpc64le.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When support for long double format with 128-bits (-mlong-double-128)
was added for platforms where long double had the same format as double,
such as powerpc, compatibility versions for the functions listed in the
commit title were missed. Since the older format of long double can
still be used (with -mlong-double-64), using these functions with a
format string that requests the printing of long double variables will
produce wrong outputs.
This patch adds the missing compatibility functions and header magic to
redirect calls to them when -mlong-double-64 is in use.
Tested for powerpc, powerpc64 and powerpc64le.
|
|
|
|
|
|
|
|
|
| |
The test case tst-ldbl-argp checks that the conversion specifier '%Lf'
correctly prints long double values with the default long double format
for a platform. This patch reuses the test case for long double with
the same format as double (-mlong-double-64).
Tested for powerpc, powerpc64 and powerpc64le.
|
|
|
|
|
|
|
|
|
|
| |
The functions argp_error and argp_failure are missing support for
printing long double values when long double has the same format as
double. This patch adds the new functions __nldbl_argp_error and
__nldbl_argp_failure, as well as header magic to redirect calls to them
when -mlong-double-64 is in use.
Tested for powerpc, powerpc64 and powerpc64le.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent commit 81a14439417552324ec6ca71f65ddf8e7cdd51c7
has introduced __wcscpy, __GI___wcscpy and the weak alias wcscpy.
This patch also introduces those symbols if glibc is build
with CFLAGS="-march=z13" where the ifunc is omitted.
ChangeLog:
* sysdeps/s390/wcscpy-vx.S: Add strong aliases to
__wcscpy, __GI___wcscpy and weak alias to wcscpy.
|
|
|
|
|
|
| |
Commit a6e8926f8d49a213a9abb1a61f6af964f612ab7f ("[BZ #20271] Add
newlines in __libc_fatal calls.") missed two places that need
changing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes more places where a space should have been present
before '(' in accordance with the GNU Coding Standards (as with the
previous patch, mainly for calls to sizeof).
Tested with build-many-glibcs.py.
* sysdeps/powerpc/powerpc32/dl-machine.c
(__elf_machine_fixup_plt): Use space before '('.
(__process_machine_rela): Likewise.
* sysdeps/powerpc/powerpc32/register-dump.h (register_dump):
Likewise.
* sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (TI_BITS):
Likewise.
* sysdeps/powerpc/powerpc64/register-dump.h (register_dump):
Likewise.
* sysdeps/powerpc/test-arith.c (union_t): Likewise.
(pattern): Likewise.
(delta): Likewise.
(check_result): Likewise.
(check_excepts): Likewise.
(check_op): Likewise.
(fail_xr): Likewise.
* sysdeps/unix/alpha/sysdep.h (syscall_promote): Likewise.
* sysdeps/unix/sysv/linux/alpha/a.out.h (AOUTHSZ): Likewise.
(SCNHSZ): Likewise.
* sysdeps/unix/sysv/linux/hppa/makecontext.c (FRAME_SIZE_BYTES):
Likewise.
(ARGS): Likewise.
(__makecontext): Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the linknamespace issues add on wcscpy refactor
for powerpc-linux-gnu-power4 as shown by the tests:
FAIL: conform/POSIX/fnmatch.h/linknamespace
FAIL: conform/POSIX/glob.h/linknamespace
FAIL: conform/POSIX/wordexp.h/linknamespace
FAIL: conform/XPG4/fnmatch.h/linknamespace
FAIL: conform/XPG4/glob.h/linknamespace
FAIL: conform/XPG4/wordexp.h/linknamespace
FAIL: conform/XPG42/fnmatch.h/linknamespace
FAIL: conform/XPG42/glob.h/linknamespace
FAIL: conform/XPG42/wordexp.h/linknamespace
[initial] wordexp -> [libc.a(wordexp.o)] fnmatch -> [libc.a(fnmatch.o)] __wcscat -> [libc.a(wcscat.o)] __wcscpy -> [libc.a(wcscpy.o)] wcscpy
Checked on powerpc-linux-gnu-power4.
* sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Define ifunc
symbol as __wcspcy instead of wcscpy.
|
|
|
|
|
|
|
|
|
| |
* include/stdio.h (__renameat2): New hidden prototype.
* stdio-common/renameat2.c (__renameat2): Add hidden definition.
* sysdeps/mach/hurd/renameat.c (__renameat): Move implementation to...
* sysdeps/mach/hurd/renameat2.c (__renameat2): ... new function, and
add support for RENAME_NOREPLACE.
* sysdeps/unix/sysv/linux/renameat2.c (__renameat2): Add hidden definition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes various places where a space should have been present
before '(' in accordance with the GNU Coding Standards. Most but not
all of the fixes in this patch are for calls to sizeof (but it's not
exhaustive regarding such calls that should be fixed).
Tested for x86_64, and with build-many-glibcs.py.
* benchtests/bench-strcpy.c (do_test): Use space before '('.
* benchtests/bench-string.h (cmdline_process_function): Likewise.
* benchtests/bench-strlen.c (do_test): Likewise.
(test_main): Likewise.
* catgets/gencat.c (read_old): Likewise.
* elf/cache.c (load_aux_cache): Likewise.
* iconvdata/bug-iconv8.c (do_test): Likewise.
* math/test-tgmath-ret.c (do_test): Likewise.
* nis/nis_call.c (rec_dirsearch): Likewise.
* nis/nis_findserv.c (__nis_findfastest_with_timeout): Likewise.
* nptl/tst-audit-threads.c (do_test): Likewise.
* nptl/tst-cancel4-common.h (set_socket_buffer): Likewise.
* nss/nss_test1.c (init): Likewise.
* nss/test-netdb.c (test_hosts): Likewise.
* posix/execvpe.c (maybe_script_execute): Likewise.
* stdio-common/tst-fmemopen4.c (do_test): Likewise.
* stdio-common/tst-printf.c (do_test): Likewise.
* stdio-common/vfscanf-internal.c (__vfscanf_internal): Likewise.
* stdlib/fmtmsg.c (NKEYWORDS): Likewise.
* stdlib/qsort.c (STACK_SIZE): Likewise.
* stdlib/test-canon.c (do_test): Likewise.
* stdlib/tst-swapcontext1.c (do_test): Likewise.
* string/memcmp.c (OPSIZ): Likewise.
* string/test-strcpy.c (do_test): Likewise.
(do_random_tests): Likewise.
* string/test-strlen.c (do_test): Likewise.
(test_main): Likewise.
* string/test-strrchr.c (do_test): Likewise.
(do_random_tests): Likewise.
* string/tester.c (test_memrchr): Likewise.
(test_memchr): Likewise.
* sysdeps/generic/memcopy.h (OPSIZ): Likewise.
* sysdeps/generic/unwind-dw2.c (execute_stack_op): Likewise.
* sysdeps/generic/unwind-pe.h (read_sleb128): Likewise.
(read_encoded_value_with_base): Likewise.
* sysdeps/hppa/dl-machine.h (elf_machine_runtime_setup): Likewise.
* sysdeps/hppa/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/ia64/fpu/sfp-machine.h (TI_BITS): Likewise.
* sysdeps/mach/hurd/spawni.c (__spawni): Likewise.
* sysdeps/posix/spawni.c (maybe_script_execute): Likewise.
* sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (query_auxv):
Likewise.
* sysdeps/unix/sysv/linux/aarch64/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/arm/bits/procfs.h (ELF_NGREG): Likewise.
* sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Likewise.
* sysdeps/unix/sysv/linux/csky/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/nios2/bits/procfs.h (ELF_NGREG):
Likewise.
* sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/procfs.h (ELF_NGREG): Likewise.
* sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
(FP_XSTATE_MAGIC2_SIZE): Likewise.
* sysdeps/x86/fpu/sfp-machine.h (TI_BITS): Likewise.
* time/test_time.c (main): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch rewrites wcscat using wcslen and wcscpy. This is similar to
the optimization done on strcat by 6e46de42fe.
The strcpy changes are mainly to add the internal alias to avoid PLT
calls.
Checked on x86_64-linux-gnu and a build against the affected
architectures.
* include/wchar.h (__wcscpy): New prototype.
* sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c
(__wcscpy): Route internal symbol to generic implementation.
* sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c (wcscpy):
Add internal __wcscpy alias.
* sysdeps/powerpc/powerpc64/multiarch/wcscpy.c (wcscpy): Likewise.
* sysdeps/s390/wcscpy.c (wcscpy): Likewise.
* sysdeps/x86_64/multiarch/wcscpy.c (wcscpy): Likewise.
* wcsmbs/wcscpy.c (wcscpy): Add
* sysdeps/x86_64/multiarch/wcscpy-c.c (WCSCPY): Adjust macro to
use generic implementation.
* wcsmbs/wcscat.c (wcscat): Rewrite using wcslen and wcscpy.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch rewrites wcpcpy using wcslen and wmemcpy. This is
similar to the optimizatio done on stpcpy by f559d8cf29.
Checked on x86_64-linux-gnu and string tests on a simulated
m68k-linux-gnu.
* sysdeps/m68k/wcpcpy.c: Remove file.
* wcsmbs/wcpcpy.c (__wcpcpy): Rewrite using wcslen and wmemcpy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch continues the process of fixing coding style to break lines
before not after operators in accordance with the GNU Coding
Standards, fixing such issues in a non-exhaustive selection of sysdeps
files that had them.
Tested for x86_64, and with build-many-glibcs.py.
* sysdeps/arm/sysdep.h (#if condition): Break lines before rather
than after operators.
* sysdeps/mach/hurd/fork.c (__fork): Likewise.
* sysdeps/mach/hurd/getcwd.c
(__hurd_canonicalize_directory_name_internal): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-consistent.c
(pthread_mutex_consistent): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-init.c (_pthread_mutex_init):
Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
(__pthread_mutex_transfer_np): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex-unlock.c
(__pthread_mutex_unlock): Likewise.
* sysdeps/mach/hurd/htl/pt-mutex.h (ROBUST_LOCK): Likewise.
(mtx_owned_p): Likewise.
* sysdeps/mach/hurd/htl/pt-mutexattr-getrobust.c
(pthread_mutexattr_getrobust): Likewise.
* sysdeps/mach/hurd/i386/init-first.c (init1): Likewise.
* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler):
Likewise.
* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
* sysdeps/mach/hurd/jmp-unwind.c (_longjmp_unwind): Likewise.
* sysdeps/mach/hurd/kill.c (__kill): Likewise.
* sysdeps/mach/hurd/mig-reply.c (__mig_get_reply_port): Likewise.
* sysdeps/mach/hurd/ptrace.c (ptrace): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h (#if condition):
Likewise.
* sysdeps/unix/sysv/linux/alpha/ioperm.c (process_cpuinfo):
Likewise.
* sysdeps/unix/sysv/linux/bits/timex.h (STA_RONLY): Likewise.
* sysdeps/unix/sysv/linux/csky/sysdep.h (#if condition): Likewise.
* sysdeps/unix/sysv/linux/generic/____longjmp_chk.c
(____longjmp_chk): Likewise.
* sysdeps/unix/sysv/linux/generic/futimesat.c (futimesat):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
(INTERNAL_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
(INTERNAL_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
(__get_clockfreq_via_cpuinfo): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes -Wimplicit-fallthrough warnings in system-specific
code that show up building glibc with -Wextra, by adding fall-through
comments, or moving existing such comments to the place required for
them to work (immediately before the case label being fallen through).
Tested with build-many-glibcs.py.
* sysdeps/i386/dl-machine.h (elf_machine_rela): Add fall-through
comments.
* sysdeps/m68k/m680x0/fpu/s_cexp_template.c (s(__cexp)): Likewise.
* sysdeps/m68k/memcopy.h (WORD_COPY_FWD): Likewise.
(WORD_COPY_BWD): Likewise.
* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
Likewise.
* sysdeps/s390/iso-8859-1_cp037_z900.c (TR_LOOP): Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_reloc): Move fall-through
comment.
* sysdeps/mips/dl-trampoline.c (__dl_runtime_resolve): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes further coding style fixes where code was breaking
lines after an operator, contrary to the GNU Coding Standards. As
with the previous patch, it is limited to files following a reasonable
approximation to GNU style already, and is not exhaustive; more such
issues remain to be fixed.
Tested for x86_64, and with build-many-glibcs.py.
* dirent/dirent.h [!_DIRENT_HAVE_D_NAMLEN
&& _DIRENT_HAVE_D_RECLEN] (_D_ALLOC_NAMLEN): Break lines before
rather than after operators.
* elf/cache.c (print_cache): Likewise.
* gshadow/fgetsgent_r.c (__fgetsgent_r): Likewise.
* htl/pt-getattr.c (__pthread_getattr_np): Likewise.
* hurd/hurdinit.c (_hurd_setproc): Likewise.
* hurd/hurdkill.c (_hurd_sig_post): Likewise.
* hurd/hurdlookup.c (__file_name_lookup_under): Likewise.
* hurd/hurdsig.c (_hurd_internal_post_signal): Likewise.
(reauth_proc): Likewise.
* hurd/lookup-at.c (__file_name_lookup_at): Likewise.
(__file_name_split_at): Likewise.
(__directory_name_split_at): Likewise.
* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
* hurd/port2fd.c (_hurd_port2fd): Likewise.
* iconv/gconv_dl.c (do_print): Likewise.
* inet/netinet/in.h (struct sockaddr_in): Likewise.
* libio/wstrops.c (_IO_wstr_seekoff): Likewise.
* locale/setlocale.c (new_composite_name): Likewise.
* malloc/memusagestat.c (main): Likewise.
* misc/fstab.c (fstab_convert): Likewise.
* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
Likewise.
* nss/nss_compat/compat-grp.c (getgrent_next_nss): Likewise.
(getgrent_next_file): Likewise.
(internal_getgrnam_r): Likewise.
(internal_getgrgid_r): Likewise.
* nss/nss_compat/compat-initgroups.c (getgrent_next_nss):
Likewise.
(internal_getgrent_r): Likewise.
* nss/nss_compat/compat-pwd.c (getpwent_next_nss_netgr): Likewise.
(getpwent_next_nss): Likewise.
(getpwent_next_file): Likewise.
(internal_getpwnam_r): Likewise.
(internal_getpwuid_r): Likewise.
* nss/nss_compat/compat-spwd.c (getspent_next_nss_netgr):
Likewise.
(getspent_next_nss): Likewise.
(internal_getspnam_r): Likewise.
* pwd/fgetpwent_r.c (__fgetpwent_r): Likewise.
* shadow/fgetspent_r.c (__fgetspent_r): Likewise.
* string/strchr.c (STRCHR): Likewise.
* string/strchrnul.c (STRCHRNUL): Likewise.
* sysdeps/aarch64/fpu/fpu_control.h (_FPU_FPCR_IEEE): Likewise.
* sysdeps/aarch64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
* sysdeps/csky/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/generic/memcopy.h (PAGE_COPY_FWD_MAYBE): Likewise.
* sysdeps/generic/symbol-hacks.h (__stack_chk_fail_local):
Likewise.
* sysdeps/gnu/netinet/ip_icmp.h (ICMP_INFOTYPE): Likewise.
* sysdeps/gnu/updwtmp.c (TRANSFORM_UTMP_FILE_NAME): Likewise.
* sysdeps/gnu/utmp_file.c (TRANSFORM_UTMP_FILE_NAME): Likewise.
* sysdeps/hppa/jmpbuf-unwind.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/mach/hurd/bits/stat.h (S_ISPARE): Likewise.
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Likewise.
(open_file): Likewise.
* sysdeps/mach/hurd/htl/pt-mutexattr-setprotocol.c
(pthread_mutexattr_setprotocol): Likewise.
* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
* sysdeps/mach/hurd/mmap.c (__mmap): Likewise.
* sysdeps/mach/hurd/ptrace.c (ptrace): Likewise.
* sysdeps/mach/hurd/spawni.c (__spawni): Likewise.
* sysdeps/microblaze/dl-machine.h (elf_machine_type_class):
Likewise.
(elf_machine_rela): Likewise.
* sysdeps/mips/mips32/sfp-machine.h (_FP_CHOOSENAN): Likewise.
* sysdeps/mips/mips64/sfp-machine.h (_FP_CHOOSENAN): Likewise.
* sysdeps/mips/sys/asm.h (multiple #if conditionals): Likewise.
* sysdeps/posix/rename.c (rename): Likewise.
* sysdeps/powerpc/novmx-sigjmp.c (__novmx__sigjmp_save): Likewise.
* sysdeps/powerpc/sigjmp.c (__vmx__sigjmp_save): Likewise.
* sysdeps/s390/fpu/fenv_libc.h (FPC_VALID_MASK): Likewise.
* sysdeps/s390/utf8-utf16-z9.c (gconv_end): Likewise.
* sysdeps/unix/grantpt.c (grantpt): Likewise.
* sysdeps/unix/sysv/linux/a.out.h (N_TXTOFF): Likewise.
* sysdeps/unix/sysv/linux/updwtmp.c (TRANSFORM_UTMP_FILE_NAME):
Likewise.
* sysdeps/unix/sysv/linux/utmp_file.c (TRANSFORM_UTMP_FILE_NAME):
Likewise.
* sysdeps/x86/cpu-features.c (get_common_indices): Likewise.
* time/tzfile.c (__tzfile_compute): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure fragment for powerpc64le contains a test for the presence
of several compiler builtins and of the __float128 type, which are
provided by GCC 6.2 for powerpc64le. Since this configure test was
added, the compiler version required to build glibc for powerpc64le was
different than that required for the other architectures.
Now that glibc requires GCC 6.2 globally (since commit ID 4dcbbc3b28aa),
this patch removes the powerpc64le-specific test.
Even tough the configure test checks for compiler features rather than
compiler version, the intent of the test was to stop build attempts at
early stages, if they had been configured with a too old compiler. It
was not the intention of the test to detect compiler breakage (such as
the removal of the required compiler features in future GCC versions),
and glibc is not the place to test for compiler regressions, anyway.
Tested for powerpc64le with GCC 6.2 (built with build-many-glibcs.py).
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building glibc with -Wextra shows a -Wimplicit-fallthrough warning for
SPARC64 that appears to be a real bug in glibc. The dynamic linker
handling of R_SPARC_H34 falls through to that of R_SPARC_H44, which in
the case of this code is nonsensical (it means the value computed for
R_SPARC_H34 gets overwritten by one computed with the different logic
for R_SPARC_H44). Thus, this patch adds the missing break there.
Note: I do not have a testcase to demonstrate this bug.
Tested with build-many-glibcs.py.
[BZ #24231]
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Add break
after R_SPARC_H34 case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From time to time the test misc/tst-clone3 fails with a timeout.
Then futex_wait is blocking. Usually ctid should be set to zero
due to CLONE_CHILD_CLEARTID and the futex should be waken up.
But the fail occures if the thread has already exited before
ctid is set to the return value of clone(). Then futex_wait() will
block as there will be nobody who wakes the futex up again.
This patch initializes ctid to a known value before calling clone
and the kernel is the only one who updates the value to zero after clone.
If futex_wait is called then it is either waked up due to the exited thread
or the futex syscall fails as *ctid_ptr is already zero instead of the
specified value 1.
ChangeLog:
* sysdeps/unix/sysv/linux/tst-clone3.c (do_test):
Initialize ctid with a known value and remove update of ctid
after clone.
(wait_tid): Adjust arguments and call futex_wait with ctid_val
as assumed current value of ctid_ptr.
|
|
|
|
|
|
|
| |
sys/procfs.h was already using this sysdeps directory.
This avoids the need for nptl-specific wrapper headers under
include/, a generic location in the source tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With internal fcntl64 internal (commit 06ab719d), it is possible to
consolidate lockf implementation by using the LFS fcntl interface
instead of using arch and system-specific implementations.
For Linux, the i386 implementation is used as generic implementation
by replacing the direct syscall with fcntl64 call. The LFS symbol
alias for default LFS ABI (__OFF_T_MATCHES_OFF64_T) is used to avoid
the duplicate symbol (instead of overriding the implementation with an
empty file).
For Hurd lockf64 semantic is changed: previous generic lockf64
implementation returned EOVERFLOW if LEN input is larger than 32-bit
off_t. However, Hurd fcntl64 implementation for F_GETLK64, F_SETLK64,
and F_SETLKW64 do accept off64_t inputs (__f_setlk accepts only off64_t
inputs).
Checked on i686-linux-gnu and x86_64-linux-gnu along with a i686-gnu
build.
* io/Makefile (tests): Add tst-lockf.
* io/lockf.c (lockf): Use __fcntl and only define for
!__OFF_T_MATCHES_OFF64_T.
* io/lockf64.c (__lockf64): Call __fcntl64 and alias to lockf for
__OFF_T_MATCHES_OFF64_T case.
* io/tst-lockf.c: New file.
* sysdeps/unix/sysv/linux/i386/lockf64.c: Remove file.
* sysdeps/unix/sysv/linux/arm/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/sh/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/lockf64.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch ce7eb0e90315 ("nptl: Cleanup cancellation macros") changed the
join sequence for internal common __pthread_timedjoin_ex to use the
new macro lll_wait_tid. The idea was this macro would issue the
cancellable futex operation depending whether the timeout is used or
not. However if a timeout is used, __lll_timedwait_tid is called and
it is not a cancellable entrypoint.
This patch fixes it by simplifying the code in various ways:
- Instead of adding the cancellation handling on __lll_timedwait_tid,
it moves the generic implementation to pthread_join_common.c (called
now timedwait_tid with some fixes to use the correct type for pid).
- The llvm_wait_tid macro is removed, along with its replication on
x86_64, i686, and sparc arch-specific lowlevellock.h.
- sparc32 __lll_timedwait_tid is also removed, since the code is similar
to generic one.
- x86_64 and i386 provides arch-specific __lll_timedwait_tid which is
also removed since they are similar in functionality to generic C code
and there is no indication it is better than compiler generated code.
New tests, tst-join8 and tst-join9, are provided to check if
pthread_timedjoin_np acts as a cancellation point.
Checked on x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, and
aarch64-linux-gnu.
[BZ #24215]
* nptl/Makefile (lpthread-routines): Remove lll_timedwait_tid.
(tests): Add tst-join8 tst-join9.
* nptl/lll_timedwait_tid.c: Remove file.
* sysdeps/sparc/sparc32/lll_timedwait_tid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c: Likewise.
* sysdeps/sysv/linux/x86_64/lll_timedwait_tid.c: Likewise.
* nptl/pthread_join_common.c (timedwait_tid): New function.
(__pthread_timedjoin_ex): Act as cancellation entrypoint is block
is set.
* nptl/tst-join5.c (thread_join): New function.
(tf1, tf2, do_test): Use libsupport and add pthread_timedjoin_np
check.
* nptl/tst-join8.c: New file.
* nptl/tst-join9.c: Likewise.
* sysdeps/nptl/lowlevellock-futex.h (lll_futex_wait_cancel,
lll_futex_timed_wait_cancel): Add generic macros.
* sysdeps/nptl/lowlevellock.h (__lll_timedwait_tid, lll_wait_tid):
Remove definitions.
* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
* sysdeps/sparc/sparc32/lowlevellock.c (__lll_timedwait_tid):
Remove function.
* sysdeps/unix/sysv/linux/i386/lowlevellock.S (__lll_timedwait_tid):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
* sysdeps/unix/sysv/linux/lowlevellock-futex.h
(lll_futex_timed_wait_cancel): New macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clone.S patch fixes 2 elfutils testsuite unwind failures, where the
backtrace gets stuck repeating __thread_start until we hit the backtrace
limit. This was confirmed by building and installing a patched glibc and
then building elfutils and running its testsuite.
Unfortunately, the testcase isn't working as expected and I don't know why.
The testcase passes even when my clone.S patch is not installed. The testcase
looks logically similarly to the elfutils testcases that are failing. Maybe
there is a subtle difference in how the glibc unwinding works versus the
elfutils unwinding? I don't have good gdb pthread support yet, so I haven't
found a way to debug this. Anyways, I don't know if the testcase is useful or
not. If the testcase isn't useful then maybe the clone.S patch is OK without
a testcase?
Jim
[BZ #24040]
* elf/Makefile (CFLAGS-tst-unwind-main.c): Add -DUSE_PTHREADS=0.
* elf/tst-unwind-main.c: If USE_PTHEADS, include pthread.h and error.h
(func): New.
(main): If USE_PTHREADS, call pthread_create to run func. Otherwise
call func directly.
* nptl/Makefile (tests): Add tst-unwind-thread.
(CFLAGS-tst-unwind-thread.c): Define.
* nptl/tst-unwind-thread.c: New file.
* sysdeps/unix/sysv/linux/riscv/clone.S (__thread_start): Mark ra
as undefined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds fall-through comments in some cases where -Wextra
produces implicit-fallthrough warnings.
The patch is non-exhaustive. Apart from architecture-specific code
for non-x86_64 architectures, it does not change sunrpc/xdr.c (legacy
code, probably should have such changes, but left to be dealt with
separately), or places that already had comments about the
fall-through but not matching the form expected by
-Wimplicit-fallthrough=3 (the default level with -Wextra; my
inclination is to adjust those comments to match rather than
downgrading to -Wimplicit-fallthrough=1 to allow any comment), or one
place where I thought the implicit fallthrough was not correct and so
should be handled separately as a bug fix. I think the key thing to
consider in review of this patch is whether the fall-through is indeed
intended and correct in each place where such a comment is added.
Tested for x86_64.
* elf/dl-exception.c (_dl_exception_create_format): Add
fall-through comments.
* elf/ldconfig.c (parse_conf_include): Likewise.
* elf/rtld.c (print_statistics): Likewise.
* locale/programs/charmap.c (parse_charmap): Likewise.
* misc/mntent_r.c (__getmntent_r): Likewise.
* posix/wordexp.c (parse_arith): Likewise.
(parse_backtick): Likewise.
* resolv/ns_ttl.c (ns_parse_ttl): Likewise.
* sysdeps/x86/cpu-features.c (init_cpu_features): Likewise.
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The type used within e_sqrt.c(__slow_ieee754_sqrtf) was, unnecessarily and
likely inadvertently, double. float is not only appropriate, but also
more efficient, avoiding the need for the compiler to emit a
round-to-single-precision instruction.
This is the difference in compiled code:
0000000000000000 <__ieee754_sqrtf>:
0: 2c 08 20 ec fsqrts f1,f1
- 4: 18 08 20 fc frsp f1,f1
- 8: 20 00 80 4e blr
+ 4: 20 00 80 4e blr
(Found by Anton Blanchard.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing the process of moving away from having bits/mathinline.h
headers in glibc, leaving the compiler to inline functions as
appropriate depending on the options passed to it, this patch removes
the header for powerpc.
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88558> is the
corresponding GCC bug for adding replacements for these powerpc
(32-bit-only) lrint / lrintf inlines.
Tested with build-many-glibcs.py for its powerpc configurations.
* sysdeps/powerpc/bits/mathinline.h: Remove.
|
|
|
|
|
|
|
|
|
|
| |
No functional change; the previous path worked as well, but it
re-added the obsolete sysdeps/generic/bits directory, which was
removed (for the first time) in commit
c72565e5f1124c2dc72573e83406fe999e56091f.
Fixes commit e47d82c99a6db060419b421768aced76bea92997 ("Provide
<bits/unistd_ext.h> as a sysdeps header exclusively").
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Non-sysdeps headers cannot be overriden by sysdeps headers across the
entire build, so it is necessary to turn such extension headers into
sysdeps headers themselves. The approach here follows the existing
<bits/shm.h> header (although it uses sysdeps/gnu instead of
sysdeps/generic).
Fixes commit 1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92 ("Linux: Add
gettid system call wrapper [BZ #6399]") and commit
8f89ab216f205c2ffd90d1fc8454efdfc0b01dee ("posix: Fix missing wrapper
header for <bits/unistd_ext.h>").
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 27761a1042daf01987e7d79636d0c41511c6df3c ("Refactor atfork
handlers") introduced a lock, atfork_lock, around fork handler list
accesses. It turns out that this lock occasionally results in
self-deadlocks in malloc/tst-mallocfork2:
(gdb) bt
#0 __lll_lock_wait_private ()
at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:63
#1 0x00007f160c6f927a in __run_fork_handlers (who=(unknown: 209394016),
who@entry=atfork_run_prepare) at register-atfork.c:116
#2 0x00007f160c6b7897 in __libc_fork () at ../sysdeps/nptl/fork.c:58
#3 0x00000000004027d6 in sigusr1_handler (signo=<optimized out>)
at tst-mallocfork2.c:80
#4 sigusr1_handler (signo=<optimized out>) at tst-mallocfork2.c:64
#5 <signal handler called>
#6 0x00007f160c6f92e4 in __run_fork_handlers (who=who@entry=atfork_run_parent)
at register-atfork.c:136
#7 0x00007f160c6b79a2 in __libc_fork () at ../sysdeps/nptl/fork.c:152
#8 0x0000000000402567 in do_test () at tst-mallocfork2.c:156
#9 0x0000000000402dd2 in support_test_main (argc=1, argv=0x7ffc81ef1ab0,
config=config@entry=0x7ffc81ef1970) at support_test_main.c:350
#10 0x0000000000402362 in main (argc=<optimized out>, argv=<optimized out>)
at ../support/test-driver.c:168
If no locking happens in the single-threaded case (where fork is
expected to be async-signal-safe), this deadlock is avoided.
(pthread_atfork is not required to be async-signal-safe, so a fork
call from a signal handler interrupting pthread_atfork is not
a problem.)
|
|
|
|
|
|
|
|
|
|
| |
This commit adds gettid to <unistd.h> on Linux, and not to the
kernel-independent GNU API.
gettid is now supportable on Linux because too many things assume a
1:1 mapping between libpthread threads and kernel threads.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One group of warnings seen with -Wextra is warnings for static or
inline not at the start of a declaration (-Wold-style-declaration).
This patch fixes various such cases for inline, ensuring it comes at
the start of the declaration (after any static). A common case of the
fix is "static inline <type> __always_inline"; the definition of
__always_inline starts with __inline, so the natural change is to
"static __always_inline <type>". Other cases of the warning may be
harder to fix (one pattern is a function definition that gets
rewritten to be static by an including file, "#define funcname static
wrapped_funcname" or similar), but it seems worth fixing these cases
with inline anyway.
Tested for x86_64.
* elf/dl-load.h (_dl_postprocess_loadcmd): Use __always_inline
before return type, without separate inline.
* elf/dl-tunables.c (maybe_enable_malloc_check): Likewise.
* elf/dl-tunables.h (tunable_is_name): Likewise.
* malloc/malloc.c (do_set_trim_threshold): Likewise.
(do_set_top_pad): Likewise.
(do_set_mmap_threshold): Likewise.
(do_set_mmaps_max): Likewise.
(do_set_mallopt_check): Likewise.
(do_set_perturb_byte): Likewise.
(do_set_arena_test): Likewise.
(do_set_arena_max): Likewise.
(do_set_tcache_max): Likewise.
(do_set_tcache_count): Likewise.
(do_set_tcache_unsorted_limit): Likewise.
* nis/nis_subr.c (count_dots): Likewise.
* nptl/allocatestack.c (advise_stack_range): Likewise.
* sysdeps/ieee754/dbl-64/s_sin.c (do_cos): Likewise.
(do_sin): Likewise.
(reduce_sincos): Likewise.
(do_sincos): Likewise.
* sysdeps/unix/sysv/linux/x86/elision-conf.c
(do_set_elision_enable): Likewise.
(TUNABLE_CALLBACK_FNDECL): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the i386 case, it appears that the sole remaining LIBC_PROBE was
removed in commit a9fe4c5aa8e53ee30f7d0a1c878391d5d6324e6e ("Support
six-argument syscalls from C for 32-bit x86, use generic
lowlevellock-futex.h (bug 18138)."), when
sysdeps/unix/sysv/linux/i386/lowlevellock-futex.h was replaced with
the generic version.
For x86_64, the relevant change is commit
76f71081cd3fe355b9c18d1fc5e87643c788cfac ("Use generic
lowlevellock-futex.h in x86_64 lowlevellock.h."), again by using the
generic version of <lowlevellock-futex.h>.
Tested on i386 and x86_64, with and without --enable-systemtap.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent commit 65f7767a914144ae303f7b9ae81865061793dcb9
has introduced __wmemcmp and the weak alias wmemcmp.
This patch also introduces those symbols if glibc is build
with CFLAGS="-march=z13" where the ifunc is omitted.
ChangeLog:
* sysdeps/s390/wmemcmp-vx.S: Add strong alias to
__wmemcmp and weak alias to wmemcmp.
|
|
|
|
|
|
|
| |
With the default "nor" constraint, current GCC will use the "o"
constraint for constants, after emitting the constant to memory. That
results in unparseable Systemtap probe notes such as "-4@.L1052".
Removing the "o" alternative and using "nr" instead avoids this.
|
|
|
|
|
|
| |
This fixes the same bug in fnmatch that was fixed by commit 7e2f0d2d77 for
regexp matching. As a side effect it also removes the use of an unbound
VLA.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the size argument is unsigned. we should use unsigned Jcc
instructions, instead of signed, to check size.
Tested on x86-64 and x32, with and without --disable-multi-arch.
[BZ #24155]
CVE-2019-7309
* NEWS: Updated for CVE-2019-7309.
* sysdeps/x86_64/memcmp.S: Use RDX_LP for size. Clear the
upper 32 bits of RDX register for x32. Use unsigned Jcc
instructions, instead of signed.
* sysdeps/x86_64/x32/Makefile (tests): Add tst-size_t-memcmp-2.
* sysdeps/x86_64/x32/tst-size_t-memcmp-2.c: New test.
|
|
|
|
|
|
|
|
| |
On Linux, we define _POSIX_PRIORITY_SCHEDULING, but functions such
as sched_setparam and sched_setscheduler apply to individual threads,
not processes.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clock_gettime, settime and getres implementations are unncessarily
complex due to using defines and C file inclusion. Simplify the
code by replacing the redundant defines and removing the inclusion,
making it much easier to understand. No functional changes.
* sysdeps/posix/clock_getres.c (__clock_getres): Cleanup.
* sysdeps/unix/clock_gettime.c (__clock_gettime): Cleanup.
* sysdeps/unix/clock_settime.c (__clock_settime): Cleanup.
* sysdeps/unix/sysv/linux/clock_getres.c (__clock_getres): Cleanup.
* sysdeps/unix/sysv/linux/clock_gettime.c (__clock_gettime): Cleanup.
* sysdeps/unix/sysv/linux/clock_settime.c (__clock_settime): Cleanup.
|