aboutsummaryrefslogtreecommitdiff
path: root/src/stat (unfollow)
Commit message (Expand)AuthorFilesLines
2022-08-20use alt signal stack when present for implementation-internal signals•••a request for this behavior has been open for a long time. the motivation is that application code, particularly under some language runtimes designed around very-low-footprint coroutine type constructs, may be operating with extremely small stack sizes unsuitable for receiving signals, using a separate signal stack for any signals it might handle. progress on this was blocked at one point trying to determine whether the implementation is actually entitled to clobber the alt stack, but the phrasing "available to the implementation" in the POSIX spec for sigaltstack seems to make it clear that the application cannot rely on the contents of this memory to be preserved in the absence of signal delivery (on the abstract machine, excluding implementation-internal signals) and that we can therefore use it for delivery of signals that "don't exist" on the abstract machine. no change is made for SIGTIMER since it is always blocked when used, and accepted via sigwaitinfo rather than execution of the signal handler. Rich Felker3-3/+3
2022-08-17ldso: make exit condition clearer in fixup_rpath•••breaking out of the switch-case when l==-1 means the conditional below will necessarily be true (-1 >= buf_size, a size_t variable) and the function will return 0. it is, however, somewhat unclear that that's what's happening. simply returning there is simpler Érico Nogueira1-1/+1
2022-08-17freopen: reset stream orientation (byte/wide) and encoding rule•••this is a requirement of the C language (orientation) and POSIX (encoding rule) that was somehow overlooked. we rely on the fact that the buffer pointers have been reset by fflush, so that any future stdio operations on the stream will go through the same code paths they would on a newly-opened file without an orientation set, thereby setting the orientation as they should. Rich Felker1-0/+2
2022-08-02ldso: process RELR only for non-FDPIC archs•••the way RELR is applied is not a meaningful operation for FDPIC (there is no single "base" address). it seems unlikely RELR would ever be added for FDPIC, but if it ever is, the behavior and possibly data format will need to be different, so guard against calling the non-FDPIC code. Rich Felker1-1/+2
2022-08-02ldso: support DT_RELR relative relocation format•••this resolves DT_RELR relocations in non-ldso, dynamic-linked objects. Fangrui Song3-4/+27
2022-08-02use syscall_arg_t and __scc macro for arguments to __alt_socketcall•••otherwise, pointer arguments are sign-extended on x32, resulting in EFAULT. Alex Xu (Hello71)1-3/+3
2022-08-01fix strings.h feature test macro usage due to missing features.hMichael Pratt1-0/+1
2022-08-01fix ESRCH error handling for clock_getcpuclockid•••the syscall used to probe availability of the clock fails with EINVAL when the requested pid does not exist, but clock_getcpuclockid is specified to use ESRCH for this purpose. Eugene Yudin1-0/+1