[libc] Fix ucontext_t and mcontext_t for C compliance (#192648)
* x86_64/ucontext_t.h: Removed alignas to fix C compilation error.
* x86_64/mcontext_t.h: Updated include guard to prevent collision.
[CAS] Fix assertion failure when opening CAS with smaller mapping size (#192565)
When opening an existing large CAS using a smaller requested mapping
size, the file size can be smaller than capacity while holding only a
shared lock. Replace the assertion with a graceful lock upgrade to
exclusive before resizing the file.
options: give more explanation on option change
the output now looks like this:
Installed packages to be REINSTALLED:
vim-9.0 (option changed: PYTHON (on -> off), NLS (off -> on))
curl-8.5 (option changed: GSSAPI (removed), LDAP (added))
Fixes: #580
[libc++] Fix realloc bug in ios.cpp (#177526)
When realloc fails in the function register_callback in `ios.cpp`, the
memory will be leaked, then `__fn_` is assigned as `nullptr`,
dereferencing `__fn_` causes UB. The fix is quite simple which aligns to
`iword & pword` for `realloc`, i.e. return directly if `realloc` fails.
Regarding testing for this bug fix, because `realloc` is a C function
that we can't replace, there is no way to exercise that path easily.
[flang] Conditional expressions lowering: use fir.if SSA results for trivial scalar types (#192338)
For trivial scalar types (INTEGER, REAL, COMPLEX, LOGICAL, UNSIGNED),
generate `fir.if` with SSA results instead of allocating a temporary and
using `hlfir.assign`. This avoids the alloca/declare/assign/load pattern
for types that can be passed directly as SSA values.
Non-trivial scalar types (derived types, characters) continue to use the
existing temporary-based paths.
The LIT test expectations have been updated accordingly, and a test case
was added.
[SPIR-V] Use ToolSubst for spirv-tools lit substitutions (#192462)
Bare-string substitutions match as substrings and the replacement path
contains the tool name, causing corrupted RUN lines
The issue is reproducible, for example, when path to llvm has tool name
substring at any point
check: relax privileges requierements
if run as user and the user is now allowed to check a file, pkg
will anyway complain with output like pkg:
fstatat(etc/ntp/leap-seconds): Permission denied
Fixes: #1740
[clang] Clear ASTContext::TUDecl in 'cleanup' for easier debugging (#191697)
While the ASTContext has more things inside, I think we should at least
clear the TUDecl so that when traversing the (dangling) AST would
immediately step on the null-dereference instead of chasing dangling
pointers and crash later.
I was bitten by this in #191058.
This commit should be NFC - assuming that people didn't traverse already
dangling ASTs.
[BOLT] Support non-null MCInst operands in annotation handling (#192188)
The annotation sentinel in BOLT is a null MCInst operand appended after
all prime operands. However, some architectures (e.g. Hexagon) use
non-null MCInst operands as legitimate prime operands for duplex
sub-instructions. The existing code treated any MCInst operand as the
annotation sentinel, causing duplex sub-instructions to be
misidentified.
In getNumPrimeOperands(), only treat a null MCInst operand as the
sentinel. In getAnnotationInstOp(), skip non-null MCInst operands when
searching for the annotation sentinel.
[mlir][tosa] Add `draft` information to specification version (#192122)
The draft flag can be used by useful to indicate that a specification
version is not yet finalized, and may be subject to change. This is
particularly important for serialized formats that offer guarantees
around backwards compatibility. By exposing `draft` information in the
specification version in the target environment, we can allow consumers
to query this information.
[libc] Fix strcasecmp/strncasecmp signedness and add tests (#192632)
Fixed character signedness bug in strcasecmp and strncasecmp
implementations in src/strings/ where characters > 127 were not
correctly handled.
Added LIBC_CRASH_ON_NULLPTR checks to both functions.
Enhanced unit tests in test/src/strings/ to be comprehensive without
duplicating basic case insensitivity tests.
Updated assertions in strcasecmp_test, strncasecmp_test, and strcmp_test
to check for sign instead of exact value.
filesystems/amazon-efs-utils: New port
Amazon EFS mount helper and watchdog utilities. Provides mount_efs(8) to mount
EFS filesystems over NFSv4.1, optionally via a local stunnel-like proxy
(efs-proxy) that terminates TLS 1.2 and handles IAM authentication using SigV4.
A watchdog daemon, started by mount_efs, monitors the proxy and restarts it if
it dies.
FreeBSD-specific adaptations:
- Binary installed as mount_efs, not mount.efs
- Uses /sbin/mount_nfs with nfsv4,minorversion=1,oneopenown,retrycnt=1
- Watchdog enumerates /var/run/efs state files cross-checked with
"mount -t nfs" (FreeBSD has no /proc/mounts and mount(8)/nfsstat(8)
do not expose the client TCP port)
- aarch64 build fix: the libc crate does not expose max_align_t for
aarch64-unknown-freebsd; substitute align_of::<u128>() in s2n-tl
Sponsored by: Netflix