about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* nscd: Remove unused variableAdhemerval Zanella2022-03-231-5/+1
|
* support: Fix support_process_state_wait path size calculationAdhemerval Zanella2022-03-231-1/+2
| | | | | | | Use INT_STRLEN_BOUND to proper get the maximum pid_t size. Also fix the wrong calculation (the 3 should multiply the sizeof (pid_t)). Checked on x86_64-linux-gnu.
* support: Remove unused extract_8 functionAdhemerval Zanella2022-03-231-11/+0
|
* locale: Remove ununsed wctype_table_get functionAdhemerval Zanella2022-03-231-27/+0
|
* gmon: Remove unused sprofil.c functionsAdhemerval Zanella2022-03-231-12/+0
|
* Update syscall lists for Linux 5.17Joseph Myers2022-03-2327-2/+29
| | | | | | | | Linux 5.17 has one new syscall, set_mempolicy_home_node. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* Fix ununsed fstatat64_time64_statxAdhemerval Zanella2022-03-231-5/+5
| | | | It is only called for legacy ABIs.
* malloc: Fix duplicate inline for do_set_mxfastAdhemerval Zanella2022-03-231-2/+1
|
* elf: Remove inline _dl_dprintfAdhemerval Zanella2022-03-231-11/+0
| | | | | | It is not used on rtld and ldsodef interfaces are meant to be used solely on loader. It also removes the only usage of gcc extension __builtin_va_arg_pack.
* configure.ac: fix bashisms in configure.acSam James2022-03-226-6/+6
| | | | | | | | | | | | | | | | | | | configure scripts need to be runnable with a POSIX-compliant /bin/sh. On many (but not all!) systems, /bin/sh is provided by Bash, so errors like this aren't spotted. Notably Debian defaults to /bin/sh provided by dash which doesn't tolerate such bashisms as '=='. This retains compatibility with bash. Fixes configure warnings/errors like: ``` checking if compiler warns about alias for function with incompatible types... yes /var/tmp/portage/sys-libs/glibc-2.34-r10/work/glibc-2.34/configure: 4209: test: xyes: unexpected operator ``` Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: Sam James <sam@gentoo.org>
* getaddrinfo: Refactor code for readabilitySiddhesh Poyarekar2022-03-231-12/+33
| | | | | | | | The close_retry goto jump is confusing and clumsy to read, so refactor the code a bit to make it easier to follow. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* Use Linux 5.17 in build-many-glibcs.pyJoseph Myers2022-03-221-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.17. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* resolv: Fix unaligned accesses to fields in HEADER structJohn David Anglin2022-03-223-14/+21
| | | | | | | | | | | | | | | | The structure HEADER is normally aligned to a word boundary but sometimes it needs to be accessed when aligned on a byte boundary. This change defines a new typedef, UHEADER, with alignment 1. It is used to ensure the fields are accessed with byte loads and stores when necessary. V4: Change to res_mkquery.c deleted. Small whitespace fix. V5: Move UHEADER typedef to resolv/resolv-internal.h. Replace all HEADER usage with UHEADER in resolv/res_send.c. Signed-off-by: John David Anglin <dave.anglin@bell.net> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* gai_init: Avoid jumping from if condition to its else counterpartSiddhesh Poyarekar2022-03-221-250/+248
| | | | | | | | | | | Clean up another antipattern where code flows from an if condition to its else counterpart with a goto. Most of the change in this patch is whitespace-only; a `git diff -b` ought to show the actual logic changes. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaiconf_init: Refactor some bits for readabilitySiddhesh Poyarekar2022-03-221-65/+84
| | | | | | | | Split out line processing for `label`, `precedence` and `scopev4` into separate functions instead of the gotos. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gethosts: Return EAI_MEMORY on allocation failureSiddhesh Poyarekar2022-03-221-2/+2
| | | | | | | | | All other cases of failures due to lack of memory return EAI_MEMORY, so it seems wrong to return EAI_SYSTEM here. The only reason convert_hostent_to_gaih_addrtuple could fail is on calloc failure. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: Split result generation into its own functionSiddhesh Poyarekar2022-03-221-90/+86
| | | | | | | Simplify the loop a wee bit and clean up variable names too. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: split loopback lookup into its own functionSiddhesh Poyarekar2022-03-221-65/+62
| | | | | | | | | | | | Flatten the condition nesting and replace the alloca for RET.AT/ATR with a single array LOCAL_AT[2]. This gets rid of alloca and alloca accounting. `git diff -b` is probably the best way to view this change since much of the diff is whitespace changes. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: make gethosts into a functionSiddhesh Poyarekar2022-03-221-58/+59
| | | | | | | | The macro is quite a pain to debug, so make gethosts into a function to make it easier to maintain. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: separate nss lookup loop into its own functionSiddhesh Poyarekar2022-03-221-277/+286
| | | | | Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: Split nscd lookup code into its own function.Siddhesh Poyarekar2022-03-221-114/+134
| | | | | | | | Add a new member got_ipv6 to indicate if the results have an IPv6 result and use it instead of the local got_ipv6. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: Split simple gethostbyname into its own functionSiddhesh Poyarekar2022-03-221-63/+64
| | | | | | | | Add a free_at flag in gaih_result to indicate if res.at needs to be freed by the caller. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: make numeric lookup a separate routineSiddhesh Poyarekar2022-03-221-439/+452
| | | | | | | | | | | | | Introduce the gaih_result structure and general paradigm for cleanups that follow to process the lookup request and return a result. A lookup function (like text_to_binary_address), should return an integer error code and set members of gaih_result based on what it finds. If the function does not have a result and no errors have occurred during the lookup, it should return 0 and res.at should be set to NULL, allowing a subsequent function to do the lookup until we run out of options. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: Simplify service resolutionSiddhesh Poyarekar2022-03-221-100/+78
| | | | | | | | | | Refactor the code to split out the service resolution code into a separate function. Allocate the service tuples array just once to the size of the typeproto array, thus avoiding the unnecessary pointer chasing and stack allocations. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* getaddrinfo: Fix leak with AI_ALL [BZ #28852]Siddhesh Poyarekar2022-03-221-9/+25
| | | | | | | | | | | | | Use realloc in convert_hostent_to_gaih_addrtuple and fix up pointers in the result list so that a single block is maintained for hostbyname3_r/hostbyname2_r and freed in gaih_inet. This result is never merged with any other results, since the hosts database does not permit merging. Resolves BZ #28852. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* gaih_inet: Simplify canon name resolutionSiddhesh Poyarekar2022-03-221-55/+75
| | | | | | | | | Simplify logic for allocation of canon to remove the canonbuf variable; canon now always points to an allocated block. Also pull the canon name set into a separate function. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* Simplify allocations and fix merge and continue actions [BZ #28931]Siddhesh Poyarekar2022-03-225-52/+750
| | | | | | | | | | | | | | | | | | | | | Allocations for address tuples is currently a bit confusing because of the pointer chasing through PAT, making it hard to observe the sequence in which allocations have been made. Narrow scope of the pointer chasing through PAT so that it is only used where necessary. This also tightens actions behaviour with the hosts database in getaddrinfo to comply with the manual text. The "continue" action discards previous results and the "merge" action results in an immedate lookup failure. Consequently, chaining of allocations across modules is no longer necessary, thus opening up cleanup opportunities. A test has been added that checks some combinations to ensure that they work correctly. Resolves: BZ #28931 Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: DJ Delorie <dj@redhat.com>
* iconv: Add UTF-7-IMAP variant in utf-7.cMax Gautier2022-03-215-6/+62
| | | | | | | | | | | | | | | | UTF-7-IMAP differs from UTF-7 in the followings ways (see RFC 3501[1] for reference) : - The shift character is '&' instead of '+' - There is no "optional direct characters" and the "direct characters" set is different - There is no implicit shift back to US-ASCII from BASE64, all BASE64 sequences MUST be terminated with '-' [1]: https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3 Signed-off-by: Max Gautier <mg@max.gautier.name> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* iconv: make utf-7.c able to use variantsMax Gautier2022-03-211-62/+172
| | | | | | | | | | Add infrastructure in utf-7.c to handle variants. The approach comes from iso646.c The variant is defined at gconv_init time and is passed as a supplementary variable. Signed-off-by: Max Gautier <mg@max.gautier.name> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* iconv: Better mapping to RFC for UTF-7Max Gautier2022-03-211-29/+31
| | | | | | | | | - Direct use of characters instead of arcane arrays - isxbase64 is not the Modified BASE64 alphabet, but the characters who needs to trigger an explicit shift back to US-ASCII. Make that clearer Signed-off-by: Max Gautier <mg@max.gautier.name> Reviewed-by: Adhemerval Zanellla <adhemerval.zanella@linaro.org>
* iconv: Always encode "optional direct" UTF-7 charactersMax Gautier2022-03-211-10/+2
| | | | | Signed-off-by: Max Gautier <mg@max.gautier.name> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* stdio-common: Add wide stream coverage to tst-vfprintf-user-typeFlorian Weimer2022-03-181-27/+93
| | | | | | And use TEST_COMPARE_STRING for the narrow tests. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* libio: Flush-only _IO_str_overflow must not return EOF (bug 28949)Florian Weimer2022-03-182-2/+8
| | | | | | | | | | | In general, _IO_str_overflow returns the character passed as an argument on success. However, if flush-only operation is requested by passing EOF, returning EOF looks like an error, and the caller cannot tell whether the operation was successful or not. _IO_wstr_overflow had the same bug regarding WEOF. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* libio: Convert tst_swprintf to the test frameworkFlorian Weimer2022-03-181-51/+28
| | | | | | And increase test coverage slightly. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* scripts/dso-ordering-test.py: Fix C&P error in * callrefs processingFlorian Weimer2022-03-181-3/+3
| | | | | | | The elf/dso-sort-tests-src subdirectory is not changed by this commit, so it seems that the cut-and-paste error was not material. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* stdio-common: Generate ja_JP.EUC-JP localeFlorian Weimer2022-03-171-0/+1
| | | | It is needed by tst-swprintf.
* stdio-common: Re-flow and sort Makefile variablesFlorian Weimer2022-03-171-66/+217
|
* nss: Sort tests and tests-container and put one test per lineSiddhesh Poyarekar2022-03-171-15/+24
| | | | Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* benchtests: Use "=" instead of ":=" [BZ #28970]H.J. Lu2022-03-161-2/+4
| | | | | | Use "=" instead of ":=" to allow sysdeps Makefiles to add more benches to bench and benchset. This fixes BZ #28970. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
* hppa: Use END instead of PSEUDO_END in swapcontext.SJohn David Anglin2022-03-151-1/+1
|
* hppa: Implement swapcontext in assembler (bug 28960)John David Anglin2022-03-152-82/+72
| | | | | | | When swapcontext.c is compiled without -g, the following error occurs: Error: CFI instruction used without previous .cfi_startproc Fix by converting swapcontext routine to assembler.
* associate a deallocator for iconv_openSteve Grubb2022-03-141-7/+8
| | | | | | | This patch associates iconv_close as a deallocator for iconv_open. This required moving the iconv_close declaration above iconv_open. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* associate a deallocation for opendirSteve Grubb2022-03-141-9/+11
| | | | | | | | This patch associates closedir as a deallocation for opendir and fdopendir. This required moving the closedir declaration above the other 2 functions. Reviewed-by: Paul Eggert <eggert@cs.ucla.edu> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add access function attributes to epoll_waitSteve Grubb2022-03-141-4/+8
| | | | | | | This patch adds write access function attributes to the epoll_wait family of functions Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add access function attributes to grp and shadow headersSteve Grubb2022-03-143-12/+24
| | | | | | | This patch adds access function attributes to the re-entrant functions in grp.h and shadow headers. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Define ISO 639-3 "tok" [BZ #28950]Carlos O'Donell2022-03-141-0/+1
| | | | | | | | | | | Effective 2022-01-20 via SIL request 2021-043 the identifier "tok" is now active for Toki Pona in the code set for ISO 639-3. References: https://iso639-3.sil.org/code/tok https://iso639-3.sil.org/sites/iso639-3/files/change_requests/2021/2021-043.pdf No regressions on x86_64.
* nss: Protect against errno changes in function lookup (bug 28953)Florian Weimer2022-03-114-4/+142
| | | | | | | | | | | | | dlopen may clobber errno. The nss_test_errno module uses an ELF constructor to achieve that, but there could be internal errors during dlopen that cause this, too. Therefore, the NSS framework has to guard against such errno clobbers. __nss_module_get_function is currently the only function that calls __nss_module_load, so it is sufficient to save and restore errno around this call. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nss: Do not mention NSS test modules in <gnu/lib-names.h>Florian Weimer2022-03-112-13/+5
| | | | | | | | They are not actually installed. Use the nss_files version instead in nss/Makefile, similar to how __nss_shlib_revision is derived from LIBNSS_FILES_SO. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* malloc: Exit early on test failure in tst-reallocFlorian Weimer2022-03-101-31/+15
| | | | | | | | | | This addresses more (correct) use-after-free warnings reported by GCC 12 on some targets. Fixes commit c094c232eb3246154265bb035182f92fe1b17ab8 ("Avoid -Wuse-after-free in tests [BZ #26779]."). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Add some missing access function attributesSteve Grubb2022-03-102-11/+17
| | | | | | | This patch adds some missing access function attributes to getrandom / getentropy and several functions in sys/xattr.h Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>