aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
AgeCommit message (Collapse)AuthorFilesLines
2025-08-23stdio-common: Convert macros across scanf input specifier testsMaciej W. Rozycki1-8/+10
Convert 'compare_real', 'read_real', and 'verify_input' macros to functions so as to improve readability and avoid pitfalls. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23stdio-common: Adjust header inclusion in scanf input specifier testsMaciej W. Rozycki1-2/+4
Move the inclusion of the data class header from the individual tests to the data-type-specific skeleton, providing for the use of the data type under test in the data class header and reducing duplication. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-23stdio-common: Fix NaN input data for scanf input specifier tests [BZ #32857]Maciej W. Rozycki48-1264/+1264
Update NaN input data with 'n-char-sequence' in reference data matching data under test, removing test failures with the M68K host. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-22x86_64: Use __seg_fs qualifiers in NPTL accessorsUros Bizjak4-96/+105
Use __seg_fs named address space qualifiers to cast NPTL accessors to %fs: prefixed addresses. Use volatile access only where strictly necessary. Use existing assembly RSEQ_* accessors for x32 to work around the GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121613 because negative value in __rseq_offset is used as an offset from %fs. Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com>
2025-08-21x86: Remove an extra space before THREAD_SELFH.J. Lu2-2/+2
After f6dd43d5f7 i386: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF() b0f0c41a5f x86_64: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF() removed the unnecessary __GNUC_PREREQ (6, 0) test, remove the extra space before THREAD_SELF macro name. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20x86_64: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()Uros Bizjak1-14/+1
Currenty GCC-12 is required as the minimum supported compiler version. Remove stalled __GNUC_PREREQ (6, 0) test for GCC compiler version in THREAD_SELF() macro definition. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20i386: Use __seg_gs qualifiers in NPTL accessorsUros Bizjak2-130/+41
Use __seg_gs named address space qualifiers to cast NPTL accessors to %gs: prefixed addresses. Use volatile access only where strictly necessary. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20i386: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()Uros Bizjak1-14/+1
Currenty GCC-12 is required as the minimum supported compiler version. Remove stalled __GNUC_PREREQ (6, 0) test for GCC compiler version in THREAD_SELF() macro definition. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20i386: Use TESTB instead of TESTL in ____longjmp_chk()Uros Bizjak1-1/+1
There is no need to use TESTL when checking the least-significant bit with a TEST instruction. Use TESTB, which is three bytes shorter: f6 44 24 04 01 testb $0x1,0x4(%esp) vs: f7 44 24 04 01 00 00 testl $0x1,0x4(%esp) 00 for the same effect. No functional changes intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20x86_64: Use TESTB instead of TESTL in CHECK_INVALID_LONGJMPUros Bizjak1-1/+1
There is no need to use TESTL when checking the least-significant bit with a TEST instruction. Use TESTB, which is three bytes shorter: f6 44 24 f0 01 testb $0x1,-0x10(%rsp) vs: f7 44 24 f0 01 00 00 testl $0x1,-0x10(%rsp) 00 for the same effect. No functional changes intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-20AArch64: Fix SVE powf routine [BZ #33299]Pierre Blanchard1-8/+8
Fix a bug in predicate logic introduced in last change. A slight performance improvement from relying on all true predicates during conversion from single to double. This fixes BZ #33299. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
2025-08-18i386: Also add GLIBC_ABI_GNU2_TLS version [BZ #33129]H.J. Lu4-14/+14
Since the GNU2 TLS run-time bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31372 affects both i386 and x86-64, also add GLIBC_ABI_GNU2_TLS version to i386 to indicate the working GNU2 TLS run-time. For x86-64, the additional GNU2 TLS run-time bug fix is needed for https://sourceware.org/bugzilla/show_bug.cgi?id=31501 Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-18htl: move sem_unlink into libc.gfleury5-10/+11
Message-ID: <20250817104023.91919-8-gfleury@disroot.org>
2025-08-18htl: move sem_{clockwait, timedwait, wait, trywait} into libc.gfleury8-12/+50
Message-ID: <20250817104023.91919-7-gfleury@disroot.org>
2025-08-18htl: move sem_post into libc.gfleury6-5/+11
Message-ID: <20250817104023.91919-6-gfleury@disroot.org>
2025-08-18htl: move sem_open, sem_close into libc.gfleury7-17/+24
Message-ID: <20250817104023.91919-5-gfleury@disroot.org>
2025-08-18htl: move sem_init into libc.gfleury5-3/+9
Message-ID: <20250817104023.91919-4-gfleury@disroot.org>
2025-08-18htl: move sem_getvalue into libc.gfleury5-3/+9
Message-ID: <20250817104023.91919-3-gfleury@disroot.org>
2025-08-18htl: move sem_destroy into libc.gfleury5-3/+9
Message-ID: <20250817104023.91919-2-gfleury@disroot.org>
2025-08-16htl: move __pthread_startup into libc.gfleury1-0/+1
Message-ID: <20250815181500.107433-20-gfleury@disroot.org>
2025-08-16htl: move __pthread_setup into libc.gfleury2-0/+2
Message-ID: <20250815181500.107433-19-gfleury@disroot.org>
2025-08-16htl: move pthread_{join, clockjoin_np, timedjoin_np, tryjoin_np} into libc.gfleury5-8/+26
Message-ID: <20250815181500.107433-18-gfleury@disroot.org>
2025-08-16htl: move pthread_exit into libc.gfleury5-13/+2
Message-ID: <20250815181500.107433-17-gfleury@disroot.org>
2025-08-16htl: move pthread_detach into libc.gfleury5-3/+7
Message-ID: <20250815181500.107433-16-gfleury@disroot.org>
2025-08-16htl: move __pthread_sigstate_init into libc.gfleury1-0/+3
Message-ID: <20250815181500.107433-15-gfleury@disroot.org>
2025-08-16htl: move pthread_mutex_transfer_np into libc.gfleury5-5/+12
Message-ID: <20250815181500.107433-14-gfleury@disroot.org>
2025-08-16htl: move pthread_getattr_np into libc.gfleury5-2/+7
Message-ID: <20250815181500.107433-13-gfleury@disroot.org>
2025-08-16htl: move pthread_testcancel into libc.gfleury5-2/+5
Message-ID: <20250815181500.107433-12-gfleury@disroot.org>
2025-08-16htl: move pthread_kill into libc.gfleury5-5/+14
Message-ID: <20250815181500.107433-11-gfleury@disroot.org>
2025-08-16htl: move pthread_cancel, __pthread_do_cancel into libc.gfleury4-2/+4
Message-ID: <20250815181500.107433-10-gfleury@disroot.org>
2025-08-16htl: move __thread_set_pcsptp into libc.gfleury3-1/+5
Message-ID: <20250815181500.107433-9-gfleury@disroot.org>
2025-08-16htl: move pthread_yield into libc.gfleury4-2/+4
Message-ID: <20250815181500.107433-8-gfleury@disroot.org>
2025-08-16htl: move pthread_getcpuclockid into libc.gfleury5-3/+11
Message-ID: <20250815181500.107433-7-gfleury@disroot.org>
2025-08-16htl: move __pthread_thread_{alloc, start, terminate} into libc.gfleury3-0/+3
Message-ID: <20250815181500.107433-6-gfleury@disroot.org>
2025-08-16htl: move __pthread_stack_alloc into libc.gfleury1-0/+2
Message-ID: <20250815181500.107433-5-gfleury@disroot.org>
2025-08-16htl: move __pthread_init_{specific, static_tls}, __pthread_{alloc}, dealloc} ↵gfleury2-1/+4
into libc. Message-ID: <20250815181500.107433-4-gfleury@disroot.org>
2025-08-16htl: move pthread_get/setconcurrency into libc.gfleury7-6/+28
Message-ID: <20250815181500.107433-3-gfleury@disroot.org>
2025-08-16htl: move pthread_setschedprio into libc.gfleury6-3/+15
Message-ID: <20250815181500.107433-2-gfleury@disroot.org>
2025-08-14x86-64: Add GLIBC_ABI_DT_X86_64_PLT [BZ #33212]H.J. Lu2-0/+14
When the linker -z mark-plt option is used to add DT_X86_64_PLT, DT_X86_64_PLTSZ and DT_X86_64_PLTENT, the r_addend field of the R_X86_64_JUMP_SLOT relocation stores the offset of the indirect branch instruction. However, glibc versions without the commit: commit f8587a61892cbafd98ce599131bf4f103466f084 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri May 20 19:21:48 2022 -0700 x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT According to x86-64 psABI, r_addend should be ignored for R_X86_64_GLOB_DAT and R_X86_64_JUMP_SLOT. Since linkers always set their r_addends to 0, we can ignore their r_addends. Reviewed-by: Fangrui Song <maskray@google.com> won't ignore the r_addend value in the R_X86_64_JUMP_SLOT relocation. Such programs and shared libraries will fail at run-time randomly. Add GLIBC_ABI_DT_X86_64_PLT version to indicate that glibc is compatible with DT_X86_64_PLT. The linker can add the glibc GLIBC_ABI_DT_X86_64_PLT version dependency whenever -z mark-plt is passed to the linker. The resulting programs and shared libraries will fail to load at run-time against libc.so without the GLIBC_ABI_DT_X86_64_PLT version, instead of fail randomly. This fixes BZ #33212. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-14i386: Add GLIBC_ABI_GNU_TLS version [BZ #33221]H.J. Lu2-0/+14
On i386, programs and shared libraries with __thread usage may fail silently at run-time against glibc without the TLS run-time fix for: https://sourceware.org/bugzilla/show_bug.cgi?id=32996 Add GLIBC_ABI_GNU_TLS version to indicate that glibc has the working GNU TLS run-time. Linker can add the GLIBC_ABI_GNU_TLS version to binaries which depend on the working TLS run-time so that such programs and shared libraries will fail to load and run at run-time against libc.so without the GLIBC_ABI_GNU_TLS version, instead of fail silently at random. This fixes BZ #33221. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-14x86-64: Add GLIBC_ABI_GNU2_TLS version [BZ #33129]H.J. Lu2-0/+14
Programs and shared libraries compiled with -mtls-dialect=gnu2 may fail silently at run-time against glibc without the GNU2 TLS run-time fix for: https://sourceware.org/bugzilla/show_bug.cgi?id=31372 Add GLIBC_ABI_GNU2_TLS version to indicate that glibc has the working GNU2 TLS run-time. Linker can add the GLIBC_ABI_GNU2_TLS version to binaries which depend on the working GNU2 TLS run-time: https://sourceware.org/bugzilla/show_bug.cgi?id=33130 so that such programs and shared libraries will fail to load and run at run-time against libc.so without the GLIBC_ABI_GNU2_TLS version, instead of fail silently at random. This fixes BZ #33129. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-11stdio-common: Add 'f' conversion tests for . scanf input [BZ #12701]Maciej W. Rozycki12-612/+612
Verify that . input is rejected by 'f' conversion (and its uppercase counterpart). Replace 0 input with .0 rather than adding new one, because the integral part of 0 is already covered by 0.0 data, so there's no need to keep this duplication. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-11stdio-common: Add 'e' conversion tests for . scanf input [BZ #12701]Maciej W. Rozycki12-648/+648
Verify that . input is rejected by 'e' conversion (and its uppercase counterpart). Replace 0e0 input with .0e0 rather than adding new one, because 0 significand is already covered by 0e+0 data, so there's no need to keep this duplication. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-11stdio-common: Add 'a', 'g' conversion tests for 0x. scanf input [BZ #12701]Maciej W. Rozycki24-1584/+1584
Verify that 0x. input is rejected by 'a' and 'g' conversions (and their uppercase counterparts). Replace 0x0p0 input with 0x.0p0 rather than adding new one, because 0x0 significand is already covered by 0x0p+0 data, so there's no need to keep this duplication. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-05Linux: Add test case for bug 33245Florian Weimer2-0/+240
The copy_file_range system call seems to be the only one that can return an off64_t value. Use FUSE to exercise this, without actually creating such large files or copying any data. Due to FUSE protocol limitations, only sizes up to UINT_MAX can be tested, but this is sufficient to check for the presence of bug 33245. The FUSE protocol limitations are raised here: copy_file_range return value on FUSE <https://lore.kernel.org/all/lhuh5ynl8z5.fsf@oldenburg.str.redhat.com/> Reviewed-by: Sam James <sam@gentoo.org> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-08-04tst-fopen-threaded.c: Delete temporary fileH.J. Lu1-2/+12
Update tst-fopen-threaded.c to call support_create_temp_directory to create a temporary directory and open "file" in the temporary directory, instead of using /tmp/openclosetest and leaving it behind. This partially fixes BZ #33182. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-04errlist: add missing entries for MIPS/SPARCLuca Boccassi1-0/+9
These are defined in the kernel headers but missing from the list of names, so strerrorname_np() returns NULL. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/uapi/asm/errno.h#n95 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/sparc/include/uapi/asm/errno.h#n55 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-01i386: Consolidate subdirectory check on elf and csuH.J. Lu1-18/+9
Consolidate subdirectory check on elf and csu to avoid checking them more than once. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-01x86-64: Consolidate subdirectory check on elf and csuH.J. Lu1-15/+10
Consolidate subdirectory check on elf and csu to avoid checking them more than once. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-07-29tst-cond23: return EXIT_UNSUPPORTED on missing clock selectionSamuel Thibault1-1/+1