about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* libio: Ensure output buffer for wchars (bug #28828)José Bollo2022-03-084-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | The _IO_wfile_overflow does not check if the write pointer for wide data is valid before access, different than _IO_file_overflow. This leads to crash on some cases, as described by bug 28828. The minimal sequence to produce the crash was: #include <stdio.h> #include <wchar.h> int main (int ac, char **av) { setvbuf (stdout, NULL, _IOLBF, 0); fgetwc (stdin); fputwc (10, stdout); /*CRASH HERE!*/ return 0; } The "fgetwc(stdin);" is necessary since it triggers the bug by setting the flag _IO_CURRENTLY_PUTTING on stdout indirectly (file wfileops.c, function _IO_wfile_underflow, line 213). Signed-off-by: Jose Bollo <jobol@nonadev.net>
* inet: Return EAI_MEMORY when nrl_domainname() fails to allocate memoryAdhemerval Zanella2022-03-081-68/+74
| | | | | | It aligns NI_NOFQDN with default behavior for getnameinfo(). Checked on x86_64-linux-gnu.
* inet: Remove strdupa from nrl_domainname()Adhemerval Zanella2022-03-081-5/+5
| | | | | | | | We can use the already in place scratch_buffer. Checked on x86_64-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
* inet: Fix getnameinfo (NI_NOFQDN) race condition (BZ#28566)Adhemerval Zanella2022-03-081-70/+78
| | | | | | | | | | | | | The 'not_first' is accessed on nrl_domainname() in a non atomically way, although it is only updated after the lock is taken. This patch fix the double-checked locking by using acquire-release atomic operation instead of plain load and by moving the 'not_first' store only after 'domain' is actually set. Checked on x86_64-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
* benchtests: make compare_strings.py accept string as attribute valueSu Lifan2022-03-081-1/+6
| | | | | | | | | | Commit ac759b1fbf28a82d99afde9046f8b72c7cba5dae added attribute "overlap" to bench-memmove-walk, whose value is a string. This change makes compare_strings.py fail since benchout_strings.schema.json requires the values of attributes to be number. This patch relaxes such constraint. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86_64: Fix svml_d_tanh8_core_avx512.S code formattingSunil K Pandey2022-03-071-360/+358
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_tanh4_core_avx2.S code formattingSunil K Pandey2022-03-071-1166/+1164
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_tanh2_core_sse4.S code formattingSunil K Pandey2022-03-071-1160/+1158
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanhf8_core_avx2.S code formattingSunil K Pandey2022-03-071-732/+730
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanhf4_core_sse4.S code formattingSunil K Pandey2022-03-071-721/+719
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanhf16_core_avx512.S code formattingSunil K Pandey2022-03-071-269/+267
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_tan8_core_avx512.S code formattingSunil K Pandey2022-03-071-2624/+2621
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_tan4_core_avx2.S code formattingSunil K Pandey2022-03-071-6047/+6044
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_tan2_core_sse4.S code formattingSunil K Pandey2022-03-071-6073/+6070
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanf8_core_avx2.S code formattingSunil K Pandey2022-03-071-2470/+2467
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanf4_core_sse4.S code formattingSunil K Pandey2022-03-071-2511/+2508
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_tanf16_core_avx512.S code formattingSunil K Pandey2022-03-071-818/+815
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_sinh8_core_avx512.S code formattingSunil K Pandey2022-03-071-399/+397
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_sinh4_core_avx2.S code formattingSunil K Pandey2022-03-071-408/+406
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_d_sinh2_core_sse4.S code formattingSunil K Pandey2022-03-071-393/+391
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_sinhf8_core_avx2.S code formattingSunil K Pandey2022-03-071-247/+245
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_sinhf4_core_sse4.S code formattingSunil K Pandey2022-03-071-246/+244
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86_64: Fix svml_s_sinhf16_core_avx512.S code formattingSunil K Pandey2022-03-071-256/+254
| | | | | | | | | | | | | | | | | | This commit contains following formatting changes 1. Instructions proceeded by a tab. 2. Instruction less than 8 characters in length have a tab between it and the first operand. 3. Instruction greater than 7 characters in length have a space between it and the first operand. 4. Tabs after `#define`d names and their value. 5. 8 space at the beginning of line replaced by tab. 6. Indent comments with code. 7. Remove redundent .text section. 8. 1 space between line content and line comment. 9. Space after all commas. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>