aboutsummaryrefslogtreecommitdiff
path: root/compat/time32/lutimes_time32.c (unfollow)
Commit message (Expand)AuthorFilesLines
2021-07-06math: fix fmaf not to depend on FE_TOWARDZEROSzabolcs Nagy1-11/+10
2021-06-23fix TZ parsing logic for identifying POSIX-form strings•••previously, the contents of the TZ variable were considered a candidate for a file/path name only if they began with a colon or contained a slash before any comma. the latter was very sloppy logic to avoid treating any valid POSIX TZ string as a file name, but it also triggered on values that are not valid POSIX TZ strings, including 3-letter timezone names without any offset. instead, only treat the TZ variable as POSIX form if it begins with a nonzero standard time name followed by +, -, or a digit. also, special case GMT and UTC to always be treated as POSIX form (with implicit zero offset) so that a stray file by the same name cannot break software that depends on setting TZ=GMT or TZ=UTC. Rich Felker1-1/+13
2021-06-05riscv: rename __NR_fstatat __NR_newfstatat•••on riscv64 this syscall is called __NR_newfstatat this helps the name match kernel UAPI for external programs Khem Raj1-1/+1
2021-04-27remove return with expression in void functionMichael Forney1-1/+1
2021-04-20remove unnecessary cast for map_library return•••the function already returns (void *) Érico Nogueira1-1/+1
2021-04-20add pthread_getname_np function•••based on the pthread_setname_np implementation Érico Rolim2-0/+26
2021-04-20fix popen not to leak pipes from one child to another•••POSIX places an obscure requirement on popen which is like a limited version of close-on-exec: "The popen() function shall ensure that any streams from previous popen() calls that remain open in the parent process are closed in the new child process." if the POSIX-future 'e' mode flag is passed, producing a pipe FILE with FD_CLOEXEC on the underlying pipe, this requirement is automatically satisfied. however, for applications which use multiple concurrent popen pipes but don't request close-on-exec, fd leaks from earlier popen calls to later ones could produce deadlock situations where processes are waiting for a pipe EOF that will never happen. to fix this, iterate through all open FILEs and add close actions for those obtained from popen. this requires holding a lock on the open file list across the posix_spawn call so that additional popen FILEs are not created after the list is traversed. note that it's still possible for another popen call to start and create its pipe while the lock is held, but such pipes are created with O_CLOEXEC and only drop close-on-exec status (when 'e' flag is omitted) under control of the lock. Rich Felker1-0/+6
2021-04-20remove spurious lock in popen•••the newly allocated FILE * has not yet leaked to the application and is only visible to stdio internals until popen returns. since we do not change any fields of the structure observed by libc internals, only the pipe_pid member, locking is not necessary. Rich Felker1-2/+0
2021-04-19define __STDC_UTF_{16,32}__ macros•••these macros are used to indicate that the implementation uses, respectively, utf-16 and utf-32 encoding for char16_t and char32_t. Érico Nogueira1-0/+3
2021-04-16fix regression in dl_iterate_phdr reporting of modules with no TLS•••__tls_get_addr should not be called with an invalid TLS module id of 0. in practice it probably "works", returning the DTV length as if it were a pointer, and the callback should probably not inspect dlpi_tls_data in this case, but it's likely that some real-world callbacks use a check on dlpi_tls_data being non-null, rather than on dlpi_tls_modid being nonzero, to conclude that the module has TLS. Rich Felker1-1/+2
2021-04-16nscd: fall back gracefully on kernels without AF_UNIX supportJoakim Sindholt1-1/+9
2021-04-16mallocng/aligned_alloc: check for malloc failure•••With mallocng, calling posix_memalign() or aligned_alloc() will SIGSEGV if the internal malloc() call returns NULL. This does not occur with oldmalloc, which explicitly checks for allocation failure. Dominic Chen1-0/+3
2021-04-03make epoll_[p]wait a cancellation point•••this is a Linux-specific function and not covered by POSIX's requirements for which interfaces are cancellation points, but glibc makes it one and existing software relies on it being one. at some point a review for similar functions that should be made cancellation points should be done. Rich Felker1-2/+2
2021-03-26fix dl_iterate_phdr dlpi_tls_data reporting to match spec•••dl_iterate_phdr was wrongly reporting the address of the DSO's PT_TLS image rather than the calling thread's instance of the TLS. the man page, which is essentially normative for a nonstandard function of this sort, clearly specifies the latter. it does not clarify where exactly within/relative-to the image the pointer should point, but the reasonable thing to do is match the ABI's DTP offset, and this seems to be what other implementations do. Rich Felker2-2/+3
2021-03-15remove no-longer-needed special case handling in popen•••popen was special-casing the possibility (only possible when the parent closed stdin and/or stdout) that the child's end of the pipe was already on the final desired fd number, in which case there was no way to get rid of its close-on-exec flag in the child. commit 6fc6ca1a323bc0b6b9e9cdc8fa72221ae18fe206 made this unnecessary by implementing the POSIX-future requirement that dup2 file actions with equal source and destination fd values remove the close-on-exec flag. Rich Felker1-16/+0
2021-03-15use internal malloc for posix_spawn file actions objects•••this makes it possible to perform actions on file actions objects with a libc-internal lock held without creating lock order relationships that are silently imposed on an application-provided malloc. Rich Felker1-0/+5
2021-03-05don't fail to map library/executable with zero-length segment maps•••reportedly the GNU linker can emit such segments, causing spurious failure to load due to mmap with a length of zero producing EINVAL. no action is required for such a load map (it's effectively a nop in the program headers table) so just treat it as always successful. Rich Felker1-0/+1
2021-02-25suppress isascii() macro for C++•••analogous to commit a60457c84a4b59ab564d7f4abb660a70283ba98d. Érico Rolim1-0/+2
2021-02-22guard against compilers failing to handle setjmp specially by default•••since 4.1, gcc has had the __returns_twice__ attribute and has required functions which return twice to carry it; however it's always applied it automatically to known setjmp-like function names. clang however does not do this reliably, at least not with -ffreestanding and possibly under other conditions, resulting in silent emission of wrong code. since the symbol name setjmp is in no way special (setjmp is specified as a macro that could expand to use any implementation-specific symbol name or names), a compiler is justified not to do anything special without further hints, and it's reasonable to do what we can to provide such hints. gcc 4.0.x and earlier do not recognize the attribute, so make use conditional on __GNUC__ macros. clang and other gcc-like compilers report (and have always reported) a later "GNUC" version so the preprocessor conditional should function as desired for them as too. undefine the internal macro after use so that nothing abuses it as a public feature. Rich Felker1-3/+11
2021-02-15aarch64/bits/mman.h: add PROT_MTE from linux v5.10•••see linux commit 9f3419315f3cdc41a7318e4d50ba18a592b30c8c arm64: mte: Add PROT_MTE support to mmap() and mprotect() Szabolcs Nagy1-0/+1
2021-02-15aarch64/bits/hwcap.h: add HWCAP2_MTE from linux v5.10•••see linux commit 3b714d24ef173f81c78af16f73dcc9b40428c803 arm64: mte: CPU feature detection and initial sysreg configuration Szabolcs Nagy1-0/+1