aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-08-05tst-freopen4: Remove temporary directory from warning messageH.J. Lu1-0/+24
tst-freopen4-main.c issues a warning message: warning: could not remove temporary file: /tmp/tst-freopen4potgti: No such file or directory since chroot makes generated temporary directories inaccessible. Add special rules for tst-freopen4.out and tst-freopen64-4.out to remove the temporary directory in warning message from tst-freopen4 and tst-freopen64-4. This partially fixes BZ #33182. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-08-05Revert "tst-freopen4-main.c: Call support_capture_subprocess with chroot"H.J. Lu1-30/+14
Revert commit 6463d4a7b28e5ee3891c34a8a1f0a59c24dfa9de to fix FAIL: stdio-common/tst-freopen4-mem FAIL: stdio-common/tst-freopen64-4-mem This fixes BZ #33254. Reviewed-by: Sam James <sam@gentoo.org>
2025-08-05iconv: Fix iconv functions not following symlinks [BZ #32339]Avinal Kumar3-3/+59
On some file systems iconv do not follow symlinks. This happens because read_conf_file() function's directory traversal loop reject symbolic links and then lstat64() call do not follow symlinks. This commit fixes the directory traversal loop to accept symbolic links and then follow the link using stat64(). The test works by creating a temporary directory and placing a symbolic link inside it that points to a configuration file. It then runs iconvconfig on this directory. The test passes if iconvconfig successfully follows the symlink and generates the cache correctly, confirming that the directory traversal logic now properly handles symbolic links. Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com> Co-authored-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> Reviewed-by: Adhemerval Zanella Netto <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-05Use TLS initial-exec model for __libc_tsd_CTYPE_* thread variables [BZ #33234]Jens Remus1-3/+3
Commit 10a66a8e421b ("Remove <libc-tsd.h>") removed the TLS initial-exec (IE) model attribute from the __libc_tsd_CTYPE_* thread variable declarations and definitions. Commit a894f04d8776 ("Optimize __libc_tsd_* thread variable access") restored it on declarations. Restore the TLS initial-exec model attribute on __libc_tsd_CTYPE_* thread variable definitions. This resolves test tst-locale1 failure on s390 32-bit, when using a GNU linker without the fix from GNU binutils commit aefebe82dc89 ("IBM zSystems: Fix offset relative to static TLS"). Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-08-05iconv: use bswap_32 instead of __builtin_bswap32Collin Funk1-4/+4
This file uses a mix of both functions, prefer the non-builtin version. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-08-04tst-env-setuid: Delete LD_DEBUG_OUTPUT outputH.J. Lu1-4/+22
Update tst-env-setuid.c to delete LD_DEBUG_OUTPUT output, instead of 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-04tst-freopen4-main.c: Call support_capture_subprocess with chrootH.J. Lu1-14/+30
Update tst-freopen4-main.c to call support_capture_subprocess with chroot, which makes temporary files inaccessible, so that temporary files can be deleted. 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-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-04Delete temporary files in support_subprocessH.J. Lu1-0/+3
Call support_delete_temp_files to delete temporary files before exit in support_subprocess. 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-04Revert "Remove use of __curbrk."Wilco Dijkstra1-3/+5
This reverts commit 1ee0b771a9c0cd2b882fe7acd38deddb7d4fbef2.
2025-08-04Revert "Improve MALLOC_DEBUG"Wilco Dijkstra1-2/+2
This reverts commit 4b3e65682d1895a651653d82f05c66ead8dfcf3b.
2025-08-04Revert "Enable THP on arenas"Wilco Dijkstra1-8/+3
This reverts commit 77d3e739360ebb49bae6ecfd4181e4e1692f6362.
2025-08-04Revert "benchtests: Avoid overflow in random memcpy/memset benchmarks"Wilco Dijkstra2-2/+2
This reverts commit 09604542d31abf1e35cd00c1db8d9bee9568bdd0.
2025-08-04Revert "Use _int_free_chunk in tcache_thread_shutdown"Wilco Dijkstra1-6/+2
This reverts commit 05ef6a49746faedb4262db1476449c1c2c822e95.
2025-08-04Revert "Remove dumped heap support"Wilco Dijkstra2-15/+582
This reverts commit 8f57caa7fdcb7ab3016897a056ccf386061e7734.
2025-08-04Revert "malloc: Cleanup libc_realloc"Wilco Dijkstra1-11/+15
This reverts commit dea1e52af38c20eae37ec09727f17ab8fde87f55.
2025-08-04Revert "Change mmap representation"Wilco Dijkstra2-24/+28
This reverts commit 4b74591022e88639dcaefb8c4a2e405d301a59e2.
2025-08-04Remove use of __curbrk.Wilco Dijkstra1-5/+3
2025-08-04Improve MALLOC_DEBUGWilco Dijkstra1-2/+2
2025-08-04Enable THP on arenasWilco Dijkstra1-3/+8
2025-08-04benchtests: Avoid overflow in random memcpy/memset benchmarksWilco Dijkstra2-2/+2
Use uint16_t rather than uint8_t for the size arrays.
2025-08-04Use _int_free_chunk in tcache_thread_shutdownWilco Dijkstra1-2/+6
2025-08-04Remove dumped heap supportWilco Dijkstra2-582/+15
2025-08-04malloc: Cleanup libc_reallocWilco Dijkstra1-15/+11
Minor cleanup of libc_realloc: remove unnecessary special cases for mmap, move ar_ptr initialization, first check for oldmem == NULL.
2025-08-04Change mmap representationWilco Dijkstra2-28/+24
2025-08-04manual: Adjust documentation to standardization of selectCollin Funk1-12/+9
The select function, fd_set, and FD_* macros were standardized by POSIX in the sys/select.h header. They are still defined in sys/types.h if __USE_MISC is defined, but we should recommend the more portable and standardized sys/select.h. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-04manual: Use sys/select.h instead of sys/time.h for select example.Collin Funk1-1/+1
The original example works on glibc since sys/time.h includes sys/select.h. However, since POSIX requires that select is defined in sys/select.h this change makes the example more portable. Reported by Gavin Smith <gavinsmith0123@gmail.com> in: <https://lists.gnu.org/archive/html/bug-texinfo/2025-07/msg00091.html>. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-04manual: document getsubopt standardization.Collin Funk1-2/+2
The getsubopt function was an XSI extension since POSIX issue 4 until it was added to Base in POSIX Issue 7. This also adds the 'restrict' qualifier to the arguments as done in POSIX.1-2024, and has been the case in glibc. 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-03hurd: support: Fix running SGID testsSamuel Thibault1-0/+21
Secure mode is enabled only if SGID actually provides a new privilege, so we have to drop it before gaining it again. Fixes commit 3a3fb2ed83f79100c116c824454095ecfb335ad7 ("Fix error reporting (false negatives) in SGID tests")
2025-08-03support: Handle COPY_FILE_RANGE events with FUSEFlorian Weimer1-0/+1
2025-08-02malloc: Cleanup sysmalloc_mmapWilco Dijkstra1-72/+19
Cleanup sysmalloc_mmap - simplify padding since it is always a constant. Remove av parameter which is only used in do_check_chunk, but since it may be NULL for mmap, it will cause a crash in checking mode. Remove the odd check on mmap in do_check_chunk. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-08-02malloc: Improve checked_request2sizeWilco Dijkstra2-28/+13
Change checked_request2size to return SIZE_MAX for huge inputs. This ensures large allocation requests stay large and can't be confused with a small allocation. As a result several existing checks against PTRDIFF_MAX become redundant. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-08-02malloc: Cleanup madvise definesWilco Dijkstra1-11/+2
Remove redundant ifdefs for madvise/THP. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-08-02benchtests: Cleanup bench-malloc-threadWilco Dijkstra1-9/+9
Change duration to 3 seconds.  Add spaces before '('. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-08-02malloc: Fix MAX_TCACHE_SMALL_SIZEWilco Dijkstra1-10/+8
MAX_TCACHE_SMALL_SIZE should use chunk size since it is used after checked_request2size. Increase limit of tcache_max_bytes by 1 since all comparisons use '<'. As a result, the last tcache entry is now used as expected. Reviewed-by: DJ Delorie <dj@redhat.com>
2025-08-01nptl: Fix SYSCALL_CANCEL for return values larger than INT_MAX (BZ 33245)Adhemerval Zanella1-2/+2
The SYSCALL_CANCEL calls __syscall_cancel, which in turn calls __internal_syscall_cancel with an 'int' return instead of the expected 'long int'. This causes issues with syscalls that return values larger than INT_MAX, such as copy_file_range [1]. Checked on x86_64-linux-gnu. [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79139 Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.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-08-01elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug 31943)Florian Weimer7-32/+280
Detect if ld.so not contiguous and handle that case in _dl_find_object. Set l_find_object_processed even for initially loaded link maps, otherwise dlopen of an initially loaded object adds it to _dlfo_loaded_mappings (where maps are expected to be contiguous), in addition to _dlfo_nodelete_mappings. Test elf/tst-link-map-contiguous-ldso iterates over the loader image, reading every word to make sure memory is actually mapped. It only does that if the l_contiguous flag is set for the link map. Otherwise, it finds gaps with mmap and checks that _dl_find_object does not return the ld.so mapping for them. The test elf/tst-link-map-contiguous-main does the same thing for the libc.so shared object. This only works if the kernel loaded the main program because the glibc dynamic loader may fill the gaps with PROT_NONE mappings in some cases, making it contiguous, but accesses to individual words may still fault. Test elf/tst-link-map-contiguous-libc is again slightly different because the dynamic loader always fills the gaps with PROT_NONE mappings, so a different form of probing has to be used. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-08-01elf: Extract rtld_setup_phdr function from dl_mainFlorian Weimer1-27/+32
Remove historic binutils reference from comment and update how this data is used by applications. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-07-31stdlib: resolve a double lock init issue after fork [BZ #32994]Davide Cavalca1-1/+5
The __abort_fork_reset_child (introduced in d40ac01cbbc66e6d9dbd8e3485605c63b2178251) call resets the lock after the fork. This causes a DRD regression in valgrind (https://bugs.kde.org/show_bug.cgi?id=503668), as it's effectively a double initialization, despite it being actually ok in this case. As suggested in https://sourceware.org/bugzilla/show_bug.cgi?id=32994#c2 we replace it here with a memcpy of another initialized lock instead, which makes valgrind happy. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-07-29Use Linux 6.16, GCC 15, binutils 2.45 in build-many-glibcs.pyJoseph Myers1-3/+3
Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
2025-07-29malloc: Enable THP always support on hugetlb tunableWilliam Hunt1-7/+11
Enable support for THP always when glibc.malloc.hugetlb=1, as the tunable currently only gives explicit support in malloc for the THP madvise mode by aligning to a huge page size. Add a thp_mode parameter to mp_ and check in madvise_thp whether the system is using madvise mode, otherwise the `__madvise` call is useless. Set the thp_mode to be unsupported by default, but if the hugetlb tunable is set this updates thp_mode. Performance of xalancbmk improves by 4.9% on Neoverse V2 when THP always mode is set on the system and glibc.malloc.hugetlb=1. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-07-29malloc: Remove redundant NULL checkWilco Dijkstra1-4/+3
Remove a redundant NULL check from tcache_get_n. Reviewed-by: Cupertino Miranda <cupertino.miranda@oracle.com>
2025-07-29replace atan2-inputs with more meaningful inputsPaul Zimmermann1-1002/+1001
Commit 934d88d used inputs with exponent generated at random in the whole binary64 exponent range, which yields essentially very large or very small values of |y/x|. Instead, this commit generates x, y at random in [-10,10], which should better corresponds to real applications. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-07-29inet-fortified: fix namespace violation (bug 33227)Sam James1-4/+4
We need to use __sz, not sz, as we do elsewhere. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-07-29tst-cond23: return EXIT_UNSUPPORTED on missing clock selectionSamuel Thibault1-1/+1
2025-07-28NEWS: Add 2.43 sectionAndreas K. Hüttel1-0/+27
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>